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 | ||
token:TriggerValue [2016/08/18 02:17] peternlewis CALCULATE(%TriggerValue%) |
token:TriggerValue [2017/11/06 01:34] peternlewis |
||
---|---|---|---|
Line 1: | Line 1: | ||
The //%TriggerValue%// token returns the value associated with how the macro was triggered. | The //%TriggerValue%// token returns the value associated with how the macro was triggered. | ||
- | Different ways ofd triggering the macro will set this field differently. | + | Different ways of triggering the macro will set this field differently. |
* You can pass an explicit value in using the "with parameter" option when executing a script from AppleScript. | * You can pass an explicit value in using the "with parameter" option when executing a script from AppleScript. | ||
Line 13: | Line 13: | ||
* It will reflect the name of the file added/removed from a folder. | * It will reflect the name of the file added/removed from a folder. | ||
- | To use the %TriggerValue% token in a numeric field, use the [CALCULATE](https://wiki.keyboardmaestro.com/function/CALCULATE) function: CALCULATE(%TriggerValue%) | + | To use the %TriggerValue% token in a numeric field, use the [CALCULATE](https://wiki.keyboardmaestro.com/function/CALCULATE) function: CALCULATE(%TriggerValue%). |
+ | |||
+ | You can easily access the individual parts using the token array notation, eg `%TriggerValue[3]%` will be the third comma-separated value, and `%TriggerValue[3];%` will be the third semicolon-separated value, and `%TriggerValue[3] %` (note the space between the `]` and the `%`) will be the third space-separated value (8.0.4+). |