|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Wed Dec 29, 2010 5:40 am
#waitsignal timeout help |
so in one alias I have
Code: |
#waitsignal heftidentified 1500 {foodpackcurrentweight=@itemheft;#say The foodpackcurrentweight of this item is @foodpackcurrentweight} {#say The heft check trigger didn't fire within the alloted time} |
According to the help file the syntax is
Code: |
#WAITSIG signal timeout {match-commands} {timeout-commands}
|
So I've got #signal heftidentified in a trigger that is turned on by #t+ earlier in the alias above. I should be able to run my alias, wait 1500miliseconds for #signal heftidentifed to be set in the armed triggers, if within that 1500 ms it should execute
Code: |
foodpackcurrentweight=@itemheft;#say The foodpackcurrentweight of this item is @foodpackcurrentweight |
and if it doesn't see #signal set to heftidentified by the end of 1500 miliseconds, it should #say the heft check trigger didn't fire within the alloted time. this isn't occuring. any idea why? do I have my syntax wrong for the 1500ms wait time? |
|
|
|
jed Adept
Joined: 18 Dec 2005 Posts: 246
|
Posted: Wed Dec 29, 2010 6:07 am |
So I figured out my problem. Turns out, after you set the signal you have to reset the signal for use next time. sooo in my triggers, where I had the #signal heftidentified line, i added another line below it, #signal heftidentified 0 which reset the signal.
Might not be bad to add this to the help file. |
|
|
|
Moo Apprentice
Joined: 10 Apr 2009 Posts: 145
|
Posted: Thu Dec 30, 2010 4:55 pm |
I think you should also be able to make your script using a multistate trigger, rather than using signals.
|
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Fri Dec 31, 2010 4:20 am |
I don't think you have to "reset" the signal. I of just tried your code from the command line of a blank session, ran it several times and it worked each time. I think something else is going on.
|
|
_________________ Asati di tempari! |
|
|
|
|
|