User Tools

Site Tools


action:Execute_a_Shell_Script

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
action:Execute_a_Shell_Script [2017/03/05 22:37]
peternlewis [Forum]
action:Execute_a_Shell_Script [2017/03/14 04:43]
peternlewis [Output of Results]
Line 13: Line 13:
 Use this format: ​ `$KMVAR_[variable_name]` Use this format: ​ `$KMVAR_[variable_name]`
  
-where //​[variable‗name]//​ is the name of your Keyboard Maestro Variable,\\  +where //​[variable‗name]//​ is the name of your Keyboard Maestro Variable, but with spaces in the name replaced with underscores (`‗`)
-but with spaces in the name replaced with underscores (`‗`)\\+
 For example: ​ "​**File Name**"​ would be formated as "​**$KMVAR‗File‗Name**"​. For example: ​ "​**File Name**"​ would be formated as "​**$KMVAR‗File‗Name**"​.
  
Line 21: Line 21:
 {{:​action:​km7-shell-script.png?​nolink|}} {{:​action:​km7-shell-script.png?​nolink|}}
  
 +Note that you can only read these environment variables. ​ You cannot write to them (or more accurately, you can write to them but that will not change the Keyboard Maestro variables that they were created from).
 ==== Passing Paths in Variables ==== ==== Passing Paths in Variables ====
  
Line 55: Line 56:
   * Asynchronously ignored — the action runs while the macro continues on.   * Asynchronously ignored — the action runs while the macro continues on.
  
 +If you want to return multiple values from a script, then you can either use AppleScript (via `osascript`) to [[manual:​Scripting#​AppleScript|set Keyboard Maestro variables]].
 ===== Examples ===== ===== Examples =====
  
action/Execute_a_Shell_Script.txt · Last modified: 2023/09/22 04:39 by peternlewis