Can't set AppleScript as a trigger - Macro says "None"

You have set your macro group to "Available when the focused window contains "Key Editor:"
Macro Group Setting

It sounds like you're now looking for a way to run your macro when the macro group becomes available.

As far as I know there is no way to autorun a macro when a macro group becomes available.

Deselect the group "Available when a focused window title contains" Macro Group option.

Use the macro trigger "the focused window title changed" instead. Then, with an If/Then action, select "Front Window Condition" to check if the title of the front window is "Key Editor:". If you want to check if any window title of the front application contains "Key Editor:" select "Any Window Condition". Then decide what you want to do.

If Window Title

(Alternatively, use the text token "%FrontWindowName%" to check if the window with the title is front or the text token "%WindowName%All%" if any window title of the front application contains title)

Keyboard Maestro Wiki Link

token:Window Tokens [Keyboard Maestro Wiki]

If you want your macro to run only once when the window is opens or closes, you'll need to find some way to track its status yourself. KM will not detect whether a specifically titled window gains or loses focus because it open or closes or because it comes to the foreground or goes to the background. It only knows that a window or titled window focus is changed.

If, however, the focused window changes/title changes/title changed triggers are good enough, you might want to check out this post:

1 Like