Keyboard Maestro macros and actions can be executed via AppleEvents which means you can do anything Keyboard Maestro can do from most scripting languages, including AppleScript, perl, python, etc.
To make this even easier, in Keyboard Maestro 3.2, we added a Script pseudo-trigger. When you select it from the New triggers popup menu, it doesn't actually add a trigger, instead it shows you how to trigger the macro from various scripting languages, for example, for AppleScript, it might look like:
tell application "Keyboard Maestro Engine" do script "B39812D2-DDA0-4309-BBA5-C9902FA5B164" -- or: do script "Paste Plain Text" end tell
So your AppleScript (or perl script, or whatever) can now easily perform any macro that you can create in Keyboard Maestro.
It is also possible to execute any action, but that is a little more tricky as you have to send the XML for the action. Still, it is useful if you want to create actions on the fly. See the documentation (or email me) for more details if you are interested in this level of control.
Posted Thursday, July 3, 2008. Permalink. Post a Comment.
None yet.
Comments