User Tools

Site Tools


token:TriggerValue

**This is an old revision of the document!**

The %TriggerValue% token returns the value associated with how the macro was triggered.

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 when using the Execute a Macro action.
  • You can pass an explicit value in when executing the macro via the web server.
  • You can pass an explicit value in when executing the macro via the kmtrigger URL.
  • It will reflect the exact text you typed to trigger a Typed String trigger.
  • It will reflect the current modifiers when triggering a macro via the Status Menu or a Palette (Note that Option means “edit this macro instead of triggering it”).
  • It will reflect the hot key or device key pressed.
  • It will reflect the application name for an application trigger.
  • 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 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+).

token/TriggerValue.1509950047.txt.gz · Last modified: 2017/11/06 01:34 by peternlewis