24.10.2023, 08:29
Hello,
I tried to use this script by event but there's no way to stop the script once started.
I used the script you suggested before but didn't work for me. I'm using a group address to trigger the event script with value 1 and would like to use the same group address with value 0 to stop the script. Do you know what could be happening? Thank you.
I tried to use this script by event but there's no way to stop the script once started.
Code:
name = 'my script name'
item = script.get(name)
script.disable(name)
os.execute('pkill -f "scripting-scheduled.lua ' .. item.id .. '"')
I used the script you suggested before but didn't work for me. I'm using a group address to trigger the event script with value 1 and would like to use the same group address with value 0 to stop the script. Do you know what could be happening? Thank you.