This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
action:Execute_a_Shell_Script [2021/10/14 04:49] peternlewis |
action:Execute_a_Shell_Script [2021/10/18 03:51] peternlewis [Path in Shell Scripts] |
||
---|---|---|---|
Line 22: | Line 22: | ||
^environment variable^meaning^ | ^environment variable^meaning^ | ||
- | |KMINFO_MacroName|The name of the parent executing macro| | + | |`KMINFO_MacroName`|The name of the parent executing macro| |
+ | |`KMINFO_MacroUUID`|The UUID of the parent executing macro| | ||
+ | |`KMINFO_MacroGroupName`|The name of the macro group containing the parent executing macro| | ||
+ | |`KMINFO_MacroGroupUUID`|The UUID of the macro group containing the parent executing macro| | ||
+ | |`KMINFO_ThisMacroName`|The name of the executing macro| | ||
+ | |`KMINFO_ThisMacroUUID`|The UUID of the executing macro| | ||
+ | |`KMINFO_ThisMacroGroupName`|The name of the macro group containing the executing macro| | ||
+ | |`KMINFO_ThisMacroGroupUUID`|The UUID of the macro group containing the executing macro| | ||
+ | |`KMINFO_TriggerTime`|The [[/unixtime|unixtime]] the parent macro started executing| | ||
+ | |`KMINFO_TriggerBase`|The type of the trigger that started the parent macro| | ||
+ | |`KMINFO_Trigger`|The trigger description of the trigger that started the parent macro| | ||
+ | |`KMINFO_TriggerValue`|the value associated with how the parent macro was triggered| | ||
+ | |`KMINFO_ActionResult`|The success or failure of the immediate past action| | ||
+ | |`KMINFO_LastWindowID`|The window ID of the most recently displayed Keyboard Maestro Engine window| | ||
+ | |`KMINFO_PromptWithListText`|The text typed in the most recently executed [[action:Prompt_With_List|Prompt With List]] action| | ||
+ | |`KMINFO_PasteByNameText`|The text typed in the most recently executed [[action:Paste_by_Name|Paste by Name]] action| | ||
==== Using Keyboard Maestro Variables ==== | ==== Using Keyboard Maestro Variables ==== | ||
Line 233: | Line 247: | ||
Any Keyboard Maestro variable that starts with `ENV_` will automatically be set as the as the corresponding environment variable (without the usual `KMVAR_` prefix). So if you set your path in the `ENV_PATH` Keyboard Maestro variable, the `PATH` environment variable will be set from it. | Any Keyboard Maestro variable that starts with `ENV_` will automatically be set as the as the corresponding environment variable (without the usual `KMVAR_` prefix). So if you set your path in the `ENV_PATH` Keyboard Maestro variable, the `PATH` environment variable will be set from it. | ||
- | You can set this Variable manually in the [[manual:manual/Preferences#Variables_Preferences|Variable Preferences Panel]] in Keyboard Maestro. Once the `ENV_PATH` variable is set, it will remain in your Keyboard Maestro variable until/unless you delete it, and remain available to every Execute a Shell Script action that you might use in the future. So you don’t need to set it in every Macro. | + | You can set this Variable manually in the [[manual:Preferences#Variables_Preferences|Variable Preferences Panel]] in Keyboard Maestro. Once the `ENV_PATH` variable is set, it will remain in your Keyboard Maestro variable until/unless you delete it, and remain available to every Execute a Shell Script action that you might use in the future. So you don’t need to set it in every Macro. |
If your tool requires other environment variables to be set you can set them as well by creating an appropriate Keyboard Maestro variable with `ENV_` at the front. | If your tool requires other environment variables to be set you can set them as well by creating an appropriate Keyboard Maestro variable with `ENV_` at the front. |