Variable Event
Moderators: JRL, Dorian (MJT support)
- Grovkillen
- Automation Wizard
- Posts: 1132
- Joined: Fri Aug 10, 2012 2:38 pm
- Location: Bräcke, Sweden
- Contact:
I don't know...
... maybe this is not correctly understud by me but isn't this possible with the event CUSTOM?
Copyied from help:
Copyied from help:
CUSTOM
Allows to create any kind of event trigger. EventParm is a subroutine which will be executed continually. ExtraParm is a variable name. When the variable name becomes TRUE the trigger is fired. See example below which creates a trigger based on a registry value.
It is true you can accomplish this with a custom event. But you only get one custom event in a script. My thinking was a way to simplify coding avoiding nested variable tests and creating an easy way to have a "case" or "cond" function.
Something like:
Something like:
Code: Select all
OnEvent>Var_State,MyVar=0,,Sub0
OnEvent>Var_State,MyVar=1,,Sub1
OnEvent>Var_State,MyVar=2,,Sub2
OnEvent>Var_State,MyVar=etc,,Sub_etc