Thanks for these, very helpful. But these are all separate actions, not results of actions, correct?
I’m using a lot of applescripts and there is a whole menu for the results, the default of which is “ignore results”. My main interest is to display a notification or a growl notification if the script fails, but nothing if it was successful. (That’s more or less how I had it set up in QuicKeys.) How is this best accomplished?
ok thanks. I can do that but those are a lot of scripts to update, and furthermore at least for the time being I need the same script files to run on 10.9 and 10.7. so only the first option would work.
but in short you’re saying that KM has no built-in mechanism for determining whether the action completed successfully? quickeys did. If an applescript fails without a try block, for example, it should throw up an error dialog. what does KM do with that sort of return?
also, is there any documentation for the options for the results? they are rather obscure, including things like “asynchrnously”
The output options are documented in the Macro Actions : Execute Actions section. The reason “briefly” is used is that it predates Notification Center (and Growl for that matter), and so it displays the message briefly using whatever technology is appropriate (either itself, or via Growl, or via Notification Center). In the future, when Notification Center is the obvious and only choice, I may change the terminology.
No, Keyboard Maestro does not detect the success or failure of the executed script, it returns the resulting text to you to decide what to do. Typically, you would write a script that does not output anything in the success case, and then you would configure the script to show any results, either briefly in a notification, or in a window.
If you wish to modify the behaviour of the macro after that action, then you can do so by storing the results somewhere (usually a variable) and then testing them as desired.
Quickeys often combines multiple components into a single action, but Keyboard Maestro tends to keep each action independent. Keyboard Maestro does have some support (which expands with each version) to allow aborting of a macro if an action fails, and it is likely that will become an option for executing script actions in the future.