manual:Tokens
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| manual:Tokens [2019/09/17 12:34] – peternlewis | manual:Tokens [2023/10/02 04:10] (current) – peternlewis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Tokens ====== | ====== Tokens ====== | ||
| - | **Keyboard Maestro provides two means to get information about objects (like web pages and windows) in the user's environment: | + | Keyboard Maestro provides two means to get information about objects (like web pages and windows) in the user's environment: |
| - | 1. [[: | + | 1. [[: |
| - | 2. [[: | + | 2. [[: |
| - | You can enter a Token in any [[/ | + | You can enter a Token in any [[/ |
| ===== Token Format ===== | ===== Token Format ===== | ||
| Line 23: | Line 23: | ||
| 1. Press ⌘⌃T (or use the Menu) to display a prompt to select the Token by Name | 1. Press ⌘⌃T (or use the Menu) to display a prompt to select the Token by Name | ||
| - | 2. GoTo menu [[Menus# | + | 2. Use the [[Menus# |
| 3. Click on the " | 3. Click on the " | ||
| 4. Of course, you can always just type the Token. | 4. Of course, you can always just type the Token. | ||
| Line 33: | Line 33: | ||
| Let's look at a real-world example. | Let's look at a real-world example. | ||
| - | 1. `%FrontBrowserTitle%` | + | 1. [[token: |
| - | 2. `%FrontBrowserURL%` | + | 2. [[token: |
| - | {{:manual:token-example-set-clipboard.png? | + | {{ token-example-set-clipboard.png? |
| - | The " | + | The " |
| - | After the macro and Action are executed, you will see this on the Clipboard: | + | After the macro and Action are executed, you will see something like this on the Clipboard: |
| - | {{:manual:token-demo-display-clipboard.png? | + | [Keyboard Maestro: Work Faster with Macros for macOS](https://www.keyboardmaestro.com/ |
| - | That's all you need for a great macro, which you can [[https:// | + | That's all you need for a great macro, which you can create yourself or |
| ===== Processing ===== | ===== Processing ===== | ||
| - | The Tokens are processed, that is replaced by their value at run time, when the Macro is run, and the Action containing the Token is executed. | + | The Tokens are processed, that is replaced by their value when the action |
| In most text fields, you can control how Tokens are processed using the Gear BUTTON{{{⚙}}} popup menu: | In most text fields, you can control how Tokens are processed using the Gear BUTTON{{{⚙}}} popup menu: | ||
| Line 56: | Line 56: | ||
| * Just tokens (not backslashed characters) or | * Just tokens (not backslashed characters) or | ||
| * Do not process any text. | * Do not process any text. | ||
| - | |||
| ===== Other Uses for Tokens ===== | ===== Other Uses for Tokens ===== | ||
| Line 66: | Line 65: | ||
| === Convert Hex to Unicode Characters === | === Convert Hex to Unicode Characters === | ||
| - | 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) . | + | Text token fields also process %NN% or %NNNN% or %NNNNNN% as arbitrary hex unicode characters (eg %41% is an A, %01F300% is 🌀). |
| === Using Special Characters as Plain Text === | === Using Special Characters as Plain Text === | ||
| Line 75: | Line 74: | ||
| ===== Text Case Conversions ===== | ===== Text Case Conversions ===== | ||
| - | Text fields also support | + | Text fields also support text case conversion using the below meta characters. You may use these in both standard Text Fields and in the Replace field of a [[action: |
| The Available Case Conversion Meta Characters are: | The Available Case Conversion Meta Characters are: | ||
| Line 100: | Line 99: | ||
| * %WindowFrame[3]%1% returns " | * %WindowFrame[3]%1% returns " | ||
| - | These tokens allow this indexing: | + | Some tokens |
| * [[token: | * [[token: | ||
manual/Tokens.1568723674.txt.gz · Last modified: by peternlewis
