0
Beantwoord
Adding a delay in Javascript
I am using Javascript to trigger a sequence of events in response to a button press. This is working well, however sometimes commands are skipped as I am not putting in delays. In the GUI side of iRidium this is easy by clicking on Delay and adding an 'ms' value. I have read through the documentation and haven't found how iRidium defines the equivalent when using JS/iRidium script i.e. IR.Delay = 300ms for example.
What is the best way to insert a JS delay?
IR.GetDevice("FMHS-ALERTSPKR-01").Set("Lab1_Alert_Playlist", ""),
IR.GetDevice("FMHS-ALERTSPKR-01").Set("play_sound", ""),
<INSERT A DELAY HERE>
IR.GetDevice("FMHS-ALERTSPKR-02").Set("Lab1_Alert_Playlist", ""),
IR.GetDevice("FMHS-ALERTSPKR-02").Set("play_sound", ""),
Customer support service by UserEcho
Hello.
In Javascript, use the IR.SetTimeout method to get the delay.