User Tools

Site Tools


action:Set_Variable_to_Text

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

Set Variable to Text Action

The Set Variable to Text action allows you to set a selected variable to plain text, by either typing in the text box, or selecting a Token.


Examples

Set To Text You Type

Set to The Clipboard

Set To Another Variable

Combine Multiple Variables and Text

There is no need to use any operators when combining text with multiple variables or other tokens. Just enter the text and variables/tokens as you would like them to appear in the Variable being set by this Action.


Setup

Configure the Action as Needed

  • Select the variable to set from the Set variable pop-up or enter a variable name.
  • In the text area, Enter the text and/or Tokens (which include Variables).
    • You may intermix text and tokens as much as you like
    • You can type the Token, in the format of %TokenName%, or select it from the popup list under Insert Token.
    • Tokens include variables, calculations, clipboards and more.
    • You can create a dynamic variable name using this format: %Variable%%%Variable%myVar%%%

Unlike most places you specify a variable, the variable name itself is a text token field, so you can set a variable whose name changes.

The Set Variable to Text action allows you to control what text processing happens in the gear menu (7+) :

  • Process Text Normally (process text tokens and backslash characters)
  • Process Text Tokens Only (process text tokens but not backslash characters)
  • Process Nothing (process neither text tokens nor backslash characters)

Most other Text Fields in Keyboard Maestro process both text tokens and (except for regular expression fields) backslash characters.

Tip: leave notes for yourself about what you're doing. Click on the gear icon at top right of the action to select Set Note…. A window appears where you can enter text. Click the OK button to save the text of the note for future reference.

See Also


Actions

Forum

action/Set_Variable_to_Text.1500077615.txt.gz · Last modified: 2017/07/14 20:13 by JMichaelTX