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
Text_Fields [2019/06/25 08:15]
peternlewis
Text_Fields [2022/11/30 22:35] (current)
ccstone
Line 1: Line 1:
-====== Text Fields ======+====== Text and Numeric ​Fields ======
  
-Keyboard Maestro has two very distinct types of fields: ​text fields ​and numeric fields Most text fields ​are text token fields. Most numeric fields are calculation fields.+Keyboard Maestro has two very distinct types of fields: ​__text fields__ ​and __numeric fields__. 
 + 
 +Most text fields ​allow the use of [[manual:​Tokens|tokens]]. 
 +Most numeric fields ​allow the use of [[Functions|Functions]]. 
 + 
 +===== Text Fields ===== 
 + 
 +Text fields offer an area where the user can enter any text, including [[manual:​Tokens|tokens]] . They may be single line, or multi-line, and may expand to more lines to fit (within limits) the content. ​ They also contain non-printing control backslash characters (meta characters) such as `\r`, `\n`, `\t`, which are replaced by their value when the Macro and Action are executed (except in regular expression fields). Text fields can include the values of variables by using the Variable token, eg: 
 + 
 +{{ :​action:​tokenfield.png?​nolink |}} 
 + 
 +You can use a calculation ​in a text field using the Calculate text token, eg *%Calculate%1+2%*. 
 + 
 +In most text fields, you can select the Gear BUTTON{{{⚙}}} popup menu to set processing options.  
 + 
 +While editing a text field, a small BUTTON{{{T}}} indicator can be seen in the top right corner of the field. 
 + 
 +**For details, see the [[manual:​Tokens|Main Tokens page]].**
  
 ===== Numeric Fields ===== ===== Numeric Fields =====
Line 25: Line 42:
 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 fieldson 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:+While editing a text fielda small BUTTON{{{C}}} indicator can be seen in the top right corner ​of the field.
  
-{{ :​action:​tokenfield.png?​nolink |}} +===== Variable Fields =====
- +
-You can use a calculation in a text field using the Calculate text token, eg *%Calculate%1+2%*.+
  
-You can insert text tokens into text fields ​using the *Edit ➤ Insert Token* menu. If you hold the option key down while selecting ​token, you will get help on that token (from this wiki).+Variable fields are similar to text fields, except they expect ​the name of variable.
  
-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).+While editing a text field, a small BUTTON{{{V}}} indicator can be seen in the top right corner of the field.
  
-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.1561464932.txt.gz · Last modified: 2019/06/25 08:15 by peternlewis