 |
seamer Magician
Joined: 26 Feb 2001 Posts: 358 Location: Australia
|
Posted: Tue Jul 09, 2002 12:21 pm
#alarm |
does #alarm take variables in the timer?
i've tried these different strings:
#alarm +@variablename {blahblah}
#alarm +{@variablename} {blahblah}
#alarm {+@variablename} {blahblah} (error anyway)
#alarm (+@variablename) {blahblah}
#alarm %expand(+@varname) {blahblah}
#alarm %expand(+@varname,1) {blahblah}
and they just create triggers that go nowhere...what am i missing? :)
Edit:
the alarm just fired...now i have to remember which one it was that fired it! if you know which is most likely, feel free to rub my nose in it ;) making a small script that reads a file generated by winamp plugin (AIMP now playing)
Why oh WHY did I have pass door on... |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jul 09, 2002 4:56 pm |
Yes. Two tests demonstrate that both of these work.
#ALARM +@test {This is a test of the variable alarm system}
#ALARM @test {%time() this is another test of the variable alarm system}
Further testing showed that the second version would change its firing time when the variable changed. I didn't test the first version for that. Note that the first version is a one-time alarm and the second is a permanent alarm.
LightBulb
Senior Member |
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Tue Jul 09, 2002 6:35 pm |
If you want to extract the varibable
value at the time of the alarm creation
you should be able to do something like:
#EXEC %concat("#ALARM +",@variablename," {blah blah}")
Ton Diening
Providing untested answers that tend to be
more complicated than others.  |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Tue Jul 09, 2002 8:32 pm |
%eval would be simpler.
#ALARM +%eval(@var) {#NOOP}
LightBulb
Senior Member |
|
|
 |
seamer Magician
Joined: 26 Feb 2001 Posts: 358 Location: Australia
|
Posted: Wed Jul 10, 2002 12:09 am |
#alarm %expand( +@var) {blah}
worked (after extensive "oh HELL, my settings are corrupt!")!
what was originally throwing me was the temp trigger (regardless of how it was created) didnt have a numeric value...the only way i could tell the trigger was active is by pulling up a plain #alarm
tondiening's suggestion creates an alarm with a numeric value (as opposed to seeing +%expand(@test) ) in the triggers list..which overcomes the "problem" i was having with the other formats. woot :)
now i have a nice status window that shows me various mud junk, AND a now playing section that updates itself, so theres no need to mouse-over winamp. (personal opinion, this is a GOOD thing! if anyone wants a screenshot, raise your hand)
Why oh WHY did I have pass door on... |
|
|
 |
|
|