User Tools

Site Tools


manual:Calculations

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
Next revision Both sides next revision
manual:Calculations [2018/06/30 03:24]
peternlewis [Operators]
manual:Calculations [2019/06/17 23:45]
peternlewis [Overview]
Line 3: Line 3:
 ===== Overview ===== ===== Overview =====
  
-Keyboard Maestro supports calculations in almost any numeric [[/​Text_Fields|text fields]]. ​ For example you can Pause for "​60*Time in Minutes"​. ​ Calculations can also use comma separated lists of numbers as arrays, and can return such arrays, so you can operate on frames and points. ​ Numeric fields often start small with up/down step arrows, but if you type anything other than a number they will expand to allow a more complex expression to be entered. ​ You can tell that a field accepts calculations because a small BUTTON{{{C}}} shows in the field while editing it.+Keyboard Maestro supports calculations in almost any numeric [[/​Text_Fields|text fields]]. ​ For example you can Pause for "​60*Time in Minutes"​. ​ Calculations can also use comma separated lists of numbers as arrays, and can return such arrays, so you can operate on rectangle ​frames and points. ​ Numeric fields often start small with up/down step arrows, but if you type anything other than a number they will expand to allow a more complex expression to be entered. ​ You can tell that a field accepts calculations because a small BUTTON{{{C}}} shows in the field while editing it.
  
 ===== Examples ===== ===== Examples =====
Line 32: Line 32:
 | Power Operator (`^`) | exponentiation | | Power Operator (`^`) | exponentiation |
 | Unary Prefix Operators (`√`, `-`, `( )` ) | square root, negation, sub-expressions | | Unary Prefix Operators (`√`, `-`, `( )` ) | square root, negation, sub-expressions |
-| [Functions](https://​wiki.keyboardmaestro.com/​Functions| a large variety of functions |+| [[:Functions|Functions]] ​| a large variety of functions |
 | Numbers and Variables or Array Accesses (5,​$5A,​0x50,​8#​007,​Variable,​Variable[5]) | identifiers and values | | Numbers and Variables or Array Accesses (5,​$5A,​0x50,​8#​007,​Variable,​Variable[5]) | identifiers and values |
 | Unary Postfix Operators (`!,%,°`)) | factorial, percent, degrees | | Unary Postfix Operators (`!,%,°`)) | factorial, percent, degrees |
Line 38: Line 38:
 Numbers are in decimal by default, but may use base 16 if they start with `$` or `0x` (eg $5A or 0x5A), or may start with a specific base followed by a `#` (eg 8#007). Numbers are in decimal by default, but may use base 16 if they start with `$` or `0x` (eg $5A or 0x5A), or may start with a specific base followed by a `#` (eg 8#007).
  
-[Variables](https://​wiki.keyboardmaestro.com/​manual/​Variablescan be used if they contain numeric expressions,​ including an *array* of numbers separated by commas, in which case you can use an array index to select the desired number. ​+[[Variables|Variables]] can be used if they contain numeric expressions,​ including an *array* of numbers separated by commas, in which case you can use an array index to select the desired number. ​
  
 You can use either `=` or `==` (v8+) for testing for equality. You can use either `=` or `==` (v8+) for testing for equality.
manual/Calculations.txt · Last modified: 2023/10/02 00:38 by peternlewis