User Tools

Site Tools


**This is an old revision of the document!**

Any active macro can be executed via AppleScript request to the Keyboard Maestro Engine. Keyboard Maestro includes a menu at the bottom of the trigger section showing example code to execute the macro by script in a variety of languages (although all variations break down to AppleScript requests, however that is done within the language). For example:

-- ignoring application responses
tell application "Keyboard Maestro Engine"
	do script "AD723329-6468-45C3-8125-DDCAC055E3ED"
	-- or: do script "My Example Macro"
end tell
-- end ignoring

As can be seen, you can execute the macro by name, or more specifically based on the UID of the macro.

Note that a macro must be active (that is, it must be enabled, and the macro group that contains it must be enabled and active) in order for the macro to be triggered by any means including via script.

trigger/Script.1423024788.txt.gz · Last modified: 2015/02/03 23:39 by peternlewis