Updated Scripting Language (markdown)

Michael Ingraham 2019-09-24 18:23:40 -04:00
parent 34fe3a5d05
commit cf0c59a9c6
1 changed files with 2 additions and 2 deletions

@ -244,11 +244,11 @@ If you define a variable with the same name as a special variable that special v
Subroutines end with the next `#` or `>` line or break. Subroutines may be nested Subroutines end with the next `#` or `>` line or break. Subroutines may be nested
Parameters can be numbers or strings and on type mismatch are converted Parameters can be numbers or strings and on type mismatch are converted
If `#define USE_SCRIPT_SUB_COMMAND` is included in your `user_config_override.h`, a subroutine may be invoked via the Console MQTT using the subroutine's name. For example, a declared subroutine `#SETLED(num)` may be invoked by typing `SETLED 1` in the Console. The parameter `1` is passed into the `num` argument. This also works with string parameters. If `#define USE_SCRIPT_SUB_COMMAND` is included in your `user_config_override.h`, a subroutine may be invoked via the Console or MQTT using the subroutine's name. For example, a declared subroutine `#SETLED(num)` may be invoked by typing `SETLED 1` in the Console. The parameter `1` is passed into the `num` argument. This also works with string parameters.
It is possible to "replace" internal Tasmota commands. For example, if a `#POWER1(num)` subroutine is declared, the command `POWER1` is processed in the scripter instead of in the main Tasmota code. It is possible to "replace" internal Tasmota commands. For example, if a `#POWER1(num)` subroutine is declared, the command `POWER1` is processed in the scripter instead of in the main Tasmota code.
`=(svar)`executes a script in a string variable (dynamic or self modifying code) `=(svar)` executes a script in a string variable (dynamic or self modifying code)
**For loop** (loop count must not be less than 1) **For loop** (loop count must not be less than 1)
``` ```