action:Switch_or_Case
**This is an old revision of the document!**
The Switch or Case action lets you read a string from the System Clipboard, from a Named Clipboard, from a variable, or from a file and then match it against various other strings to choose which set of actions to do.
The action contains a sequence of conditional segments, each of which tests the source string and then conditionally executes the corresponding set of actions.
The condition can test the source and see if:
- has text of some sort.
- does not have text.
- has an image of some sort.
- does not have an image.
- is exactly (case insensitively) a specified string.
- is not exactly (case insensitively) a specified string.
- contains (case insensitively) a specified string.
- does not contain (case insensitively) a specified string.
- matches a specified regular expression.
- does not match a specified regular expression.
- has some flavor that conforms to the specified Uniform Type Identifier.
- does not have a flavor that conforms to the specified Uniform Type Identifier.
- otherwise (aka always).
In all cases at most one sequence will execute, and the conditions are evaluated in order - the first one that matches will execute. So don't put an “otherwise” clause in the middle of your switch statement.
action/Switch_or_Case.1436950706.txt.gz · Last modified: by peternlewis
