Script_Disable: strange behaviour - 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: Script_Disable: strange behaviour (/showthread.php?tid=1288) |
Script_Disable: strange behaviour - Domoticatorino - 14.03.2018 Code: script.disable('Valvola_Bagno_Giorno_Automatismo') Code: script.disable('Valvola Bagno Notte Automatismo') Hi above 2 event based script which works but in the first case script anable and disable does not work. I mean that does not disable the script ('Valvola_Bagno_Giorno_Automatismo'). The name of the script is correct. I cannot the reason why in the second script I see the resident script ('Valvola Bagno Notte Automatismo') which change its status. In the other case no. I cannot understand the reason why. Thanks. RE: Script_Disable: strange behaviour - admin - 14.03.2018 Are you sure that the name is correct? In one place you have name with spaces, in another with "_". You can also do this: Code: log(script.disable('Valvola_Bagno_Giorno_Automatismo')) If logged value is nil it means that script is not found. RE: Script_Disable: strange behaviour - Domoticatorino - 14.03.2018 Yes, I used "_" because at the beginning there's not. I copied the name of the script and paste it. The same thing I did with the working script. In any case I check. Thanks. I log the variable. The first time was bool:false, the second time I test it value was nil. How is it possible? Thanks. |