|
kurosh Beginner
Joined: 01 May 2002 Posts: 18
|
Posted: Thu Jun 12, 2003 7:48 am
alarms and string lists |
Two questions...
Is it possible to use one time alarms with more precision than seconds? Or is there an alternative other than #wait? For example
#ALA +5 {save} if I wanted it to be in 5.5 seconds instead of 5 what could I do?
Also, I have a variable with a string list in it and an if statement that wants to check to see if the input equals one of the values in the string list. Is the only way to do this #FORALL or is there a better way?
Example:
@junk=(a|b|c|d|e)
#forall @junk {#IF {%i=%1} {true}} |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jun 12, 2003 8:47 am |
Well, you could use 5.5
#ALA +5.5 {save}
Or, if it's for a trigger, you could use a Wait type multi-state trigger.
#TR {your trigger}
#COND {} {save} {Wait|Param=5500}
Better ways of checking list membership include doing it directly in the trigger pattern
#TR {{@junk}} {true}
or using %ismember()
#IF (%ismember( %1, @junk)) {true}
LightBulb
Advanced Member |
|
|
|
kurosh Beginner
Joined: 01 May 2002 Posts: 18
|
Posted: Thu Jun 12, 2003 7:07 pm |
Answer to my second question works fine thanks. But, the first one doesn't work... I've tried using decimals and they don't work, perhaps it's because I'm using version 6.16?
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Jun 12, 2003 7:19 pm |
That's correct. There are no multi-state triggers in 6.16, and #ALARM is limited to 1-second increments. If you aren't willing to upgrade, you'll just have to accept the limitations of the version you prefer.
LightBulb
Advanced Member |
|
|
|
|
|