I want to Try an action which works on the front window, but when I click the Try button that is (of course) the KM editor. Is there a way to have Try wait a second or two so I can activate the relevant window before it runs the action I’m trying to test? I realize I could put the action into a separate macro with its own trigger, but that’s a bit of a kludge.
Hey irlsmith, Do you mean aside from just inserting a pause action into the macro? You could also have an ask user for input dialogue, so that you can move your focus to a different window and hit okay.
What I actually do for this is I have a separate macro triggered by alt+space, that just opens the trigger macro by name. Then, if I want to test or run any macro at all, I just hit that trigger and then type the name. It's pretty efficient for testing and also using macros that I don't use very often, but have a specific enough task.
Trigger.kmmacros (1.4 KB)
There are many workarounds of the problem, such as the ones you suggest. What I want to do is just Try a single action, which is part of a larger macro. If I select (highlight) it, and hit Try, then just that action runs, but it runs in the KM editor window, not in the window which would be foremost. (The action is Move and Click and Drag at (533,-50) from the Bottom Left Corner of the Front Window.) What I am hoping is some way to set Try to wait a second or two before firing. What I did instead is make a dummy macro with its own hotkey and paste only the one action into it. But that’s kludgey.
One simple workaround is to insert a “Activate Application” action just before the Actions you want to try. If normally the same app is already active and frontmost, then this will have no effect during production use.
Another approach is to insert a “Debugger Breakpoint” just before the actions to test, and run the full macro. IMO, this is probably the best approach since if there are any other variables or setup needed, it will be done properly. When finished testing/debugging, either delete the Debugger action, or just disable it.
The Activate Application is a great solution! Thanks for pointing that out.