The <LET: {SCORE}> hot code evaluates a variable's value and assign each possible option a score.
For more details on <LET> hot code, see the LET hot code topic.
Format | Action | Example |
<LET:name={SCORE} assessing-variable = value-option-1:score-value-1 | value-option-2:score-value-2 | ... | value-option-N:score-value-N > | Define a variable name whose value will be assigned based on the value of the assessing-variable. | <LET:result = {SCORE} duration=daily:1|weekly:2|monthly:3|*:4> will assess the duration variable and assign a score of 1 to variable result if the duration is daily; score of 2 if the duration is weekly; score of 3 if the duration is monthly and score of 4 for everything else. |
Notes:
The <LET: {CALCULATE}> hot code defines a variable as a result of a mathematical expression and re-uses it in the subsequent processing of the shortcut.
For more details on <LET> hot code, see the LET hot code topic.
Format | Action | Example |
<LET:name={CALCULATE} math-expression> | Define a variable name whose value will be calculated at run-time using the math-expression. | See more information below |
Mathematical Expression
Mathematical expressions use the following operators:
Operator | Meaning | Example |
+ | Plus | 2 + 2 will give the result 4 |
- | Minus | 3 - 2 will give the result 1 |
* | Multiplication | 3 * 2 will give the result 6 |
/ | Division | 12 / 4 will give the result 3 |
^ | Power | 2 ^ 3 will give the result 8 |
Notes: