This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
token:Calculate [2016/09/19 12:32] JMichaelTX Clarify examples for using variable name |
token:Calculate [2017/09/04 23:56] peternlewis |
||
---|---|---|---|
Line 1: | Line 1: | ||
{{:token:calculator-icon.png |}}===== Calculate Token ===== | {{:token:calculator-icon.png |}}===== Calculate Token ===== | ||
- | The //%Calculate%//**<formula>**//%// [[:Tokens|token]] returns the **numeric** result of performing a calculation,\\ | + | The //%Calculate%//**<formula>**//%// [[:Tokens|token]] returns the **numeric** result of performing a calculation, |
where //**`<formula>`**// may be any of the following: | where //**`<formula>`**// may be any of the following: | ||
* Mathematical formula like `(2 + 3)*12` | * Mathematical formula like `(2 + 3)*12` | ||
Line 10: | Line 10: | ||
* `%Calculate%(MyVarWordsPerSec * 60)/MyVarWordsPerPage%` | * `%Calculate%(MyVarWordsPerSec * 60)/MyVarWordsPerPage%` | ||
* Use any of the built-in Keyboard Maestro [functions](:Functions), like [[function:RANDOM|RANDOM(10)]] | * Use any of the built-in Keyboard Maestro [functions](:Functions), like [[function:RANDOM|RANDOM(10)]] | ||
- | * Get the numeric value of an Variable array element, like `MyVar[2]`\\ "`10,05,12,08`" returns "`5`" \\ (Arrays may contain only numeric data) | + | * Get the numeric value of an Variable array element, like `MyVar[2]`, if MyVar is `10,05,12,08` returns `5` (Arrays may contain only numeric data) |
**Example Action** | **Example Action** |