Variable Event

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Variable Event

Post by JRL » Thu Jul 19, 2012 4:29 pm

Event fires when variable passes a test

User avatar
Grovkillen
Automation Wizard
Posts: 1023
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

I don't know...

Post by Grovkillen » Thu Jan 03, 2013 9:40 am

... maybe this is not correctly understud by me but isn't this possible with the event CUSTOM?

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.
Let>ME=%Script%

Running: 15.0.24
version history

User avatar
JRL
Automation Wizard
Posts: 3501
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Thu Jan 03, 2013 3:47 pm

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:

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

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts