Logic Machine Forum
"Pause" function in a script - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: "Pause" function in a script (/showthread.php?tid=3006)



"Pause" function in a script - legolas2069 - 23.11.2020

Hi, I have a Sonos system and a Homelynk, and I want to control a large script, so that I can pause it.

I wrote the following script:

1-General structure:

if value_n then
-play sonos
-do some knx
-Every X orders, I call to stop the function and check if I pressed the button.
end

I have 15 if like this in 8k lines.

2- Function stop (), where I compare in a group address and I pause Sonos if a button is pushed. I do os.sleep (1) until the button is released.

When I run the script without interruptions it works, but when I try it with the stop function the homelynk starts to work slow.

I am doing something wrong? (Sure I am xD)

Thank you for your help.


RE: "Pause" function in a script - Daniel - 23.11.2020

You probably have infinite loop.


RE: "Pause" function in a script - legolas2069 - 25.11.2020

(23.11.2020, 16:13)Daniel. Wrote: You probably have infinite loop.

Perhaps, I was wondering if this was the problem. Today I will try with a simple script to see if I get it.

Thanks!