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
Text_Fields [2019/07/01 01:08]
peternlewis [Text Fields]
Text_Fields [2019/08/25 17:38] (current)
JMichaelTX Initial changes to fix title and put Text Fields section at top
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 are allow entry of [[manual:​Tokens|tokens]]. Most numeric fields ​allow entry 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.  
 + 
 +**For details, see the [[manual:​Tokens|Main Tokens page]].**
  
 ===== Numeric Fields ===== ===== Numeric Fields =====
Line 25: Line 37:
 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 ===== 
- 
-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 |}} 
- 
-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 a token, you will get help on that token (from this wiki). 
- 
-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 (\\). 
  
 ===== Script Fields ===== ===== Script Fields =====
Text_Fields.1561957727.txt.gz · Last modified: 2019/07/01 01:08 by peternlewis