How to edit a macro via a status menu item?

Sure. You could also use the keyboardmaestro://m=macro-UUID method that's documented here.

In your OP you wanted to add a menu item. If you want to have the edit option from both the name and keystroke you could either

  • Make a separate "editor" macro that opened your desired macro in the KM Editor, give it a hot key and include it in the Status menu
  • Keep the single macro, included in the Status menu, and add an "If" action to open if for editing if a modifier key is down

To include the option to "edit this macro", just add

...to an "If" with the appropriate Conditions.

Do you always want to enable/disable the same actions? You're generally better off simply putting them in a conditional block so they are or aren't executed -- which also means you don't need to have the KM Editor open.

But if you do want to do it with AS you'll need to know the macro and action(s) IDs. At which point (use your own IDs):

tell application "Keyboard Maestro"
	tell macro id "F9A89CF4-D9C2-4DCD-9F48-B81D6BE5FB78"
		set enabled of action id "16583730" to true -- or false to disable
		set enabled of action id "16583737" to true -- or false to disable
	end tell
end tell