Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision |
| trigger:Script [2015/07/03 08:39] – peternlewis | trigger:Script [2023/09/21 08:07] (current) – [See Also] peternlewis |
|---|
| 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, usually by using the *osascript* tool). For example: | Any active macro can be triggered 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, usually by using the *osascript* tool). For example: |
| |
| -- ignoring application responses | -- ignoring application responses |
| |
| You can pass a parameter to the macro by adding *with parameter "Whatever"* to the *do script* command. The parameter is available to the macro as the [[token:TriggerValue|%TriggerValue% text token]] (v7.0+). | You can pass a parameter to the macro by adding *with parameter "Whatever"* to the *do script* command. The parameter is available to the macro as the [[token:TriggerValue|%TriggerValue% text token]] (v7.0+). |
| | |
| | ===== See Also ===== |
| | |
| | === Triggers === |
| | |
| | * [[URL|URL]] trigger |
| | * [[keyboardmaestro|keyboardmaestro CLI Tool]] |
| | * [[Trigger File|Trigger File]] |
| | * [[/Triggers|All Triggers]] |
| | |