Scripting
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| Scripting [2015/12/16 00:34] – ccstone | Scripting [2019/07/01 05:11] (current) – [Shell] peternlewis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ===== Scripting on OSX Using Keyboard Maestro ===== | + | {{: |
| + | ===== Scripting on OS X Using Keyboard Maestro ===== | ||
| - | ---- | + | While the number of, and power of, native Keyboard Maestro Actions is vast, sometimes you may need to do something that Keyboard Maestro is not well suited to do. But Keyboard Maestro has anticipated, |
| + | ==== Execute Script Actions ==== | ||
| - | ==== Set Keyboard Maestro variable using AppleScript. ==== | + | {{:km-7.1-execute-script-actions.png? |
| - | < | + | For example, the [[action: |
| - | # Keyboard Maestro — Set value of variable "< | + | {{: |
| - | set myText to " | + | Note that the script can be either embedded in the _Action_, or in an external script file, linked using the _Execute Script File_ choice. |
| - | tell application " | + | The Actions for the other script languages are very similar. |
| - | if variable " | + | |
| - | set value of variable " | + | |
| - | else | + | |
| - | make new variable with properties {name:" | + | |
| - | end if | + | |
| - | end tell | + | |
| - | </ | + | |
| + | :!: **For more details about scripting, see the [[manual: | ||
| + | |||
| + | ==== AppleScript ==== | ||
| + | |||
| + | * [[AppleScript]] -- Using Keyboard Maestro Variables in AppleScript. | ||
| + | * [[action: | ||
| + | |||
| + | |||
| + | ==== JavaScript ==== | ||
| + | |||
| + | * [[action: | ||
| + | * [[action: | ||
| + | * [[action: | ||
| + | * [[action: | ||
| + | * [[JavaScript for Automation]] -- Provides an introduction to JXA and comparison with AppleScript.\\ | ||
| + | |||
| + | |||
| + | ==== Shell ==== | ||
| + | |||
| + | * [[action: | ||
| + | |||
| + | |||
| + | ==== Swift ==== | ||
| + | |||
| + | * [[action: | ||
| + | |||
| + | |||
| + | ==== Automator ==== | ||
| + | |||
| + | * [[action: | ||
| + | |||
| + | |||
| + | ===== See Also ===== | ||
| + | |||
| + | * [[Scripting_the_Keyboard_Maestro_editor|Scripting the Keyboard Maestro editor]] | ||
| + | * [[manual: | ||
| + | |||
| + | ==== Forum ==== | ||
| + | |||
| + | - [[https:// | ||
| + | - [[https:// | ||
| + | - [[https:// | ||
| + | - [[https:// | ||
| - | ==== Get Keyboard Maestro variable using AppleScript. ==== | ||
| - | < | ||
| - | # Keyboard Maestro — Get value of variable "< | ||
| - | tell application " | ||
| - | if variable " | ||
| - | set myAppleScriptVariableName to value of variable " | ||
| - | end if | ||
| - | end tell | ||
| - | </ | ||
Scripting.1450226088.txt.gz · Last modified: by ccstone
