User Tools

Site Tools


Text_Fields

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
Text_Fields [2019/06/25 08:15]
peternlewis
Text_Fields [2019/07/01 01:08]
peternlewis [Text Fields]
Line 25: Line 25:
 You can insert functions into numeric fields using the *Edit ➤ Insert Function* menu. If you hold the option key down while selecting a function, you will get help on that function (from this wiki). You can insert functions into numeric fields using the *Edit ➤ Insert Function* menu. If you hold the option key down while selecting a function, you will get help on that function (from this wiki).
  
-Text fields, on the other hand, start out larger. They may be single line, or multi-line, and may expand to more lines to fit (within limits) the content. Text token fields process [[:​Tokens|text tokens]] which are marked with percents, like *%CurrentClipboard%* or *%Variable%My Variable%* and typically (but not always) have an Insert Token pull down menu.  They also process backslash characters (eg \r, \n, \t, etc) (except in regular expression fields). Text fields can include the values of variables by using the Variable token, eg:+===== Text Fields ===== 
 + 
 +Text fields, on the other hand, start out larger. They may be single line, or multi-line, and may expand to more lines to fit (within limits) the content. Text token fields process [[:​Tokens|text tokens]] which are marked with percents, like *%CurrentClipboard%* or *%Variable%My Variable%* and typically (but not always) have an Insert Token pull down menu.  They also process backslash characters (eg `\r``\n``\t`, etc) (except in regular expression fields). Text fields can include the values of variables by using the Variable token, eg:
  
 {{ :​action:​tokenfield.png?​nolink |}} {{ :​action:​tokenfield.png?​nolink |}}
Line 33: Line 35:
 You can insert text tokens into text fields using the *Edit ➤ Insert Token* menu. If you hold the option key down while selecting a token, you will get help on that token (from this wiki). You can insert text tokens into text fields using the *Edit ➤ Insert Token* menu. If you hold the option key down while selecting a token, you will get help on that token (from this wiki).
  
-Text token fields also process %NN% or %NNNN% as arbitrary hex unicode characters (eg %41% is an A), 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). 
 + 
 +Text tokens can also include the [[manual:​Tokens#​Text_Case_Conversions|Text Case Conversion]] characters like `\U` and `\L`. 
 + 
 +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 (\\).
  
-To include a percent in your text, simply double the percent (%%). To include a backslash \ in your text, double the backslash (\\).+===== Script Fields =====
  
 Almost every field in Keyboard Maestro actions is either a numeric field or a text token field. The major exceptions are script fields. ​ Scripts are not processed for text tokens, they must access variables through [other means](http://​www.keyboardmaestro.com/​documentation/​6/​scripting.html). Almost every field in Keyboard Maestro actions is either a numeric field or a text token field. The major exceptions are script fields. ​ Scripts are not processed for text tokens, they must access variables through [other means](http://​www.keyboardmaestro.com/​documentation/​6/​scripting.html).
Text_Fields.txt · Last modified: 2022/11/30 22:35 by ccstone