Table of Contents

Prompt For Snippet Action

The Prompt For Snippet action (v11.0+) allows you to create a snippet built from a template with fields entered when you execute the macro.

The snippet defines the template using the %Ask% token, which can include a size and a default value.

 Prompt For Snippet Action

The size is roughly the number of characters (default 20), or lines (default 5) if the token is on a line by itself, and the default value is either the specified value if : is the separator or the value of the specified variable if = is the separator.

This action produces a prompt like this:

 Prompt For Snippet Window

Output of Results

The results of a shell script can be:

Result Button

The %PromptButton% token is set to the name of the button pressed, and can be used in actions later in this instance like any other text token. The deprecated Result Button variable is also set to the name of the button pressed.

⚠️ Note that the macro will terminate if you press the Cancel button, so to get any result other than OK you will need to use the Try or Catch action to catch the abort and continue anyway.

See Also

Actions

Tokens