test if resident script running - 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: test if resident script running (/showthread.php?tid=1324) |
test if resident script running - rocfusion - 29.03.2018 Hi, It is possible to test whether a resident script is running? Thanks, Roger RE: test if resident script running - buuuudzik - 29.03.2018 (29.03.2018, 19:42)rocfusion Wrote: Hi, From the manual on the left side of Script Editor: Code: script.status('scriptname') RE: test if resident script running - rocfusion - 30.03.2018 Perfect, thank you.. RE: test if resident script running - Domoticatorino - 26.04.2018 Hi buuuudzik, I would like to link the status of a script to an object. So, I use status script.status('scriptname') but in order to do that I have to create another script? status = script.status ('Sequenza Irrigazione 1') Value = status grp.write('32/1/3', value) But who trigger this script? So does it become a dangerous loop? Thanks. RE: test if resident script running - buuuudzik - 26.04.2018 If you want to have such mapping better is to managing script by this object and not in other place. So e.g. you have your script "Irrigating" and you use script.enable and script.disable only in event script for object e.g. 2/2/2 'Irrigating on/off' You can also add something in Init script. RE: test if resident script running - Domoticatorino - 26.04.2018 Code: mintimer = 1 -- minimum timer value in seconds Let me show you. This above is a event scheduler which run when group 3/6/201 is triggered (true or false it does not matter) If script status group is 32/1/3 do you mean insert this below in the same script above? status = script.status('scriptname') value = status grp.write(32/1/3, value) I did that. I use this instruction at the beginning of the script and at the end. Problem is that I never received false to group 32/1/3. I hope you understand what you mean. Thanks. RE: test if resident script running - buuuudzik - 26.04.2018 In this case actually you have object and now I see that you have some os.sleep. So you can do it like below: Code: scriptStatusGA = '32/1/3' RE: test if resident script running - Domoticatorino - 27.04.2018 Great!! Thank you very much |