runInfo
Returns a fact about the running macro, such as its name, id or trigger.
Keyboard Maestro: ExecutingMacroUUID, ExecutingMacroGroup, ExecutingInstance, Trigger, TriggerBase, ActionResult, PromptButton, AlertButton, LastWindowID
Details #
runInfo(key) takes exactly one argument, the name of the fact, and returns it. It looks in the facts the macro runner supplies for the run (for example macroName, macroID, groupName, groupID, instanceID, instanceName, trigger, triggerBase). If the runner has no such fact it looks for a run variable with that name, which is how values an earlier step stored (actionResult, promptButton, alertButton and so on) are found. If neither exists the answer is empty text, not an error.
The key is matched exactly, including case.
Parameters #
Takes 1 argument.
{{ runInfo(text) }}
Examples #
runInfo("macroName")runInfo("promptButton")OK| Sample variable | Value |
|---|---|
promptButton | OK |
Gotchas #
It takes exactly one argument:
runInfo() takes 1 argument, got 0.A misspelled key returns empty text instead of an error, so check the key name if you get nothing back.
Outside a macro run (the playground, for instance) the runner's facts aren't there, so you get empty text unless a variable of that name is set.