Scripting questions
2 posters
Page 1 of 1
Scripting questions
1. I have seen that mixing ranges and specific values is not working in events. For example the following line should print the text if @myvariable is 1,2,3,4,6:
[(@myvariable:1-4,6) {text:hello}]
It would be possible to mix ranges and single values like this?
2. I miss to have the option to write long comments or sentences in the scripts, as they are getting more complex day after day. Could it be possible to write some sentences between two special characters? I mean something like this:
[(init){@myvariable:0}]
(*
this script is for …
the variable is for …
the press action makes that …
last modification: …
*)
[(press){@myvariable:1}]
[(@myvariable:1-4,6) {text:hello}]
It would be possible to mix ranges and single values like this?
2. I miss to have the option to write long comments or sentences in the scripts, as they are getting more complex day after day. Could it be possible to write some sentences between two special characters? I mean something like this:
[(init){@myvariable:0}]
(*
this script is for …
the variable is for …
the press action makes that …
last modification: …
*)
[(press){@myvariable:1}]
jordikt- Posts : 291
Join date : 2024-02-10
Re: Scripting questions
jordikt wrote:It would be possible to mix ranges and single values like this?
No, the script parser can currently only handle a single value, a range or a transition, not a combination. I have no immediate plans to change that. To solve the problem, the command in your example can be split into two commands.
jordikt wrote:I miss to have the option to write long comments or sentences in the scripts
If you remove the special characters you suggested as command markers, you can write comments exactly as you have done. The script parser ignores everything outside of the parentheses, so as long as you avoid using the characters [](){} in your comments, you can add whatever you like. You can even add free text inside a command if you keep it outside the (){} parentheses.
jordikt likes this post
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum