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 "visdimopacity & visdim"
#8
(15.06.2020, 11:59)Daniel. Wrote: It is full script, Set 'visdim', 0  to turn it off
Thank you for your reply. It seems to me that the browser needs to be refreshed for this to take effect. Is that right? Can we make it immediate (not requiring a refresh)?

I have the following code:
Code:
-- Set screen dimming on/off

require('uci')

if (event.getvalue() == true) then
  log('Auto dimming on') 
  uci.set('genohm-scada', 'core', 'visdimopacity', 80)
  uci.set('genohm-scada', 'core', 'visdim', 1)
 
else
  log('Auto dimming off')
  uci.set('genohm-scada', 'core', 'visdimopacity', 80)
  uci.set('genohm-scada', 'core', 'visdim', 0)
 
end

uci.commit('genohm-scada') 

I trigger this script with a toggle button on a Visualisation screen. While it works, it does need a refresh, so my question above remains. Can we make it take effect immediately?

Thanks!
Reply


Messages In This Thread
Change "visdimopacity & visdim" - by JMM - 09.08.2017, 12:23
RE: Change "visdimopacity & visdim" - by JMM - 10.08.2017, 11:24
RE: Change "visdimopacity & visdim" - by tassiebean - 16.06.2020, 04:13

Forum Jump: