User Tools

Site Tools


condition:Script

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

The Script condition executes a script and checks the result.

The script can be in a file or text within the application, and can be:

  • an AppleScript.
  • a Shell script.
  • a Swift script.
  • a JavaScript for Automation (JXA) script.

You can test the result of executing the script:

  • returns success (that is, the script ran without errors).
  • returns an error (the script returned some sort of error code).
  • returns a specific status code (unlike almost all other numeric fields, this cannot be a calculation).
  • returns text that is exactly a specified string.
  • returns text that is not exactly a specified string.
  • returns text that is contains a specified string.
  • returns text that is does not contain a specified string.
  • returns text that is matches a specified regular expression.
  • returns text that is does not matches a specified regular expression.

The script will receive the Keyboard Maestro variables in its environment as usual for any executed script in Keyboard Maestro.

See Also


Actions

Conditions

condition/Script.1457388300.txt.gz · Last modified: 2016/03/07 17:05 by AlainLifchitz