User Tools

Site Tools


manual:Tokens

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
manual:Tokens [2019/07/01 01:04]
peternlewis
manual:Tokens [2019/07/01 01:07] (current)
peternlewis
Line 2: Line 2:
  
 Tokens allow you to add textual information to [[/​Text_Fields|token text fields]]. ​ You can tell that a field accepts tokens because a small BUTTON{{{T}}} shows in the field while editing it. Tokens allow you to add textual information to [[/​Text_Fields|token text fields]]. ​ You can tell that a field accepts tokens because a small BUTTON{{{T}}} shows in the field while editing it.
 +
 +For example, `%SystemClipboard%` will be replaced by the text in the clipboard.
  
 You can insert tokens into a field using the Insert Token popup near the field or by choosing from the [[Menus#​Insert_Token|Edit โžค Insert Token menu]]. ​ You can also start typing a token and use type completion to complete the token. ​ You can insert a token by name by choosing the [[Menus#​Insert_Token_by_Name|Edit โžค Insert Token by Name menu]]. You can insert tokens into a field using the Insert Token popup near the field or by choosing from the [[Menus#​Insert_Token|Edit โžค Insert Token menu]]. ​ You can also start typing a token and use type completion to complete the token. ​ You can insert a token by name by choosing the [[Menus#​Insert_Token_by_Name|Edit โžค Insert Token by Name menu]].
  
 The available tokens are listed on the [[/​Tokens|wiki Tokens page]]. The available tokens are listed on the [[/​Tokens|wiki Tokens page]].
 +
 +==== Processing ====
  
 Text token fields also process %NN% or %NNNN% or %NNNNNN% as arbitrary hex unicode characters (eg %41% is an A, %01F300% is ๐ŸŒ€), and (except for regular expression fields) process backslashed characters \a,​\b,​\e,​\f,​\t,​\r,​\n (bell,​backspace,​escape,​form feed,​tab,​return,​line feed). Text token fields also process %NN% or %NNNN% or %NNNNNN% as arbitrary hex unicode characters (eg %41% is an A, %01F300% is ๐ŸŒ€), and (except for regular expression fields) process backslashed characters \a,​\b,​\e,​\f,​\t,​\r,​\n (bell,​backspace,​escape,​form feed,​tab,​return,​line feed).
Line 11: Line 15:
 To include a percent in your text, simply double the percent (%%). To include a backslash \ in your text, double the backslash (\\). To include a percent in your text, simply double the percent (%%). To include a backslash \ in your text, double the backslash (\\).
  
-In most text fields, you can select (in the BUTTON{{{โš™}}} menu) whether to process normally, or just tokens (not backspashed ​characters) or do no text processing at all.  Alternatively,​ to include a percent in your text, simply double the percent (%%). To include a backslash \ in your text, double the backslash (\\).+In most text fields, you can select (in the BUTTON{{{โš™}}} menu) whether to process ​tokens ​normally, or just tokens (not backslashed ​characters) or do no text processing at all.  Alternatively,​ to include a percent in your text, simply double the percent (%%). To include a backslash \ in your text, double the backslash (\\).
  
 ==== Text Case Conversions ==== ==== Text Case Conversions ====
Line 26: Line 30:
  
 You should not use `\u` after `\U` or `\l` after `\L` unless you terminate the sequence with `\E` first. You should not use `\u` after `\U` or `\l` after `\L` unless you terminate the sequence with `\E` first.
 +
 +==== Arrays ====
  
 With tokens that commonly contain arrays of information,​ 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+). This currently works with the following tokens: With tokens that commonly contain arrays of information,​ 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+). This currently works with the following tokens:
Line 39: Line 45:
 * [[token:​CurrentMouse|CurrentMouse]] * [[token:​CurrentMouse|CurrentMouse]]
 * [[token:​FoundImage|FoundImage]] * [[token:​FoundImage|FoundImage]]
- 
-Many actions allow you to turn off tokens or backslash character processing if you need to use text that has percent or backslash characters. ​ You can control this by clicking the BUTTON{{{โš™}}} button and using the action menu. 
manual/Tokens.txt ยท Last modified: 2019/07/01 01:07 by peternlewis