This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Change Active Status of a Script
#6
(13.05.2021, 08:46)jamesng Wrote: Hi

Here is the output of the your test code - it's working

Code:
TEST 13.05.2021 18:43:24
* arg: 1
  * bool: true
* arg: 2
  * nil

I found the error in my earlier code too .. working function below

Code:
-- Change active status of script
function enableScript(scriptname, active)
 
  if active == true then
   script.enable(scriptname)
   log('Script "' .. scriptname .. '" is active')
  else
   script.disable(scriptname)
    log('Script "' .. scriptname .. '" is disabled')
  end
 
end

Many thanks

Kind Regards
James

Im just a beginner, but i hope you will help me.

I will activate and disable a 'Resident script' depending on a feedback object of a output.
the group object is 1/4/53 (bedroom [fb])
when this object is true i will run a script to activate the 'Resident script' called 'bedroom [fb], turn off'
and the same but turn it off by the same group adress
when this object is false i will run a script to disable the 'Resident script' called 'bedroom [fb], turn off'

I saw you will do the same, but i dont know how to use this script.
Reply


Messages In This Thread
Change Active Status of a Script - by jamesng - 13.05.2021, 06:07
RE: Change Active Status of a Script - by Dré - 12.10.2021, 12:19

Forum Jump: