Page 1 of 1

Easy Scripting Timer

Posted: 06 Jul 2022 11:43
by jens_s
Hello,
i would like to switch some lights after a few seconds in a script, but i always have any error in the Timer function.

These two possibilities did i find in EasyScripting

1.: Error: Unexpected Token )
setTimer("myTimer", () => {vdev("Scenes_37").on()}, 50)
stopTimer("myTimer")

2. without Error, but doesn't work
setTimer("myTimer", function() {vdev("Scenes_31").on()}, 20)
stopTimer("myTimer")

Re: Easy Scripting Timer

Posted: 06 Jul 2022 12:57
by aLiEnHeAd
stopTimer("myTimer") stops your timer and the function will not be called