token:Calculate
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| token:Calculate [2017/09/05 03:55] – peternlewis | token:Calculate [2023/11/10 03:29] (current) – peternlewis | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{: | + | ===== Calculate Token ===== |
| The // | The // | ||
| Line 10: | Line 10: | ||
| * `%Calculate%(MyVarWordsPerSec * 60)/ | * `%Calculate%(MyVarWordsPerSec * 60)/ | ||
| * Use any of the built-in Keyboard Maestro [functions](: | * Use any of the built-in Keyboard Maestro [functions](: | ||
| - | * Get the numeric value of an Variable array element, like `MyVar[2]`\\ "`10, | + | * Get the numeric value of an Variable array element, like `MyVar[2]`, if MyVar is `10, |
| + | |||
| + | The //%Hex2%// token (v8+) returns the value in Hex format, padded with zeros to two digits. | ||
| + | |||
| + | The //%Dec2%// token (v8+) returns the value in decimal format, padded with zeros to two digits (similarly //%Dec5%// to five digits, etc). | ||
| + | |||
| + | The //%Oct3%// token (v8+) returns the value in octal format, padded with zeros to three digits (similarly //% Oct5%// to five digits, etc). | ||
| + | |||
| + | The //%Bin8%// token (v8+) returns the value in binary format, padded with zeros to eight digits (similarly //% Bin16%// to 16 digits digits, etc). | ||
| **Example Action** | **Example Action** | ||
| Line 25: | Line 33: | ||
| * %Calculate%MyVar% will return `5` | * %Calculate%MyVar% will return `5` | ||
| + | ===== See Also ===== | ||
| + | |||
| + | ==== Actions ==== | ||
| + | |||
| + | * [[action: | ||
| + | * [[: | ||
| + | |||
| + | === Tokens === | ||
| + | * [[token: | ||
| + | * [[/ | ||
token/Calculate.1504583737.txt.gz · Last modified: by peternlewis
