Been beating my brain up here. What is the best way to insert a 10 second delay in a script? I need to delay and wait for an event before I can proceed to the next one. Thanks.. Much appreicated!
Announcement
Collapse
No announcement yet.
Need delay!!!
Collapse
X
-
I'll let a more experienced user give you a definitive answer, but I don't think it's possible to delay a script. It's my understanding that eSignal starts the script at main(), and that's the only place.
To do what you want, you'll need to set a static variable that says "wait for event", then return from main. When main is invoked again, check the variable to see if you're waiting for the event, if so check the event, if still hasn't happened, return and check it again on the next invocation.
This should work fine as long as your event is market driven.
-
you cant..
All the efs scripts run with "each tick". So you can't drop the efs script into a "while" loop to "wait" for something.
You have to record the TIME of the event (see the efs time functions). Once you record the time (I usually record this in seconds), then you can create a delay.
if ((recordedevent+delay_time) >= Current_RTTime) {
..then we can trigger the next phase.
}
I use this type of stuff all the time and it works.Brad Matheny
eSignal Solution Provider since 2000
Comment
Comment