PDA

View Full Version : Lua state refresh with dynamic var



Manser
October 7th, 2009, 09:40 AM
if I have the full var name in the getVariable the state refresh whenever
the var value change


if NetRemote.GetVariable("Allen_OutMute.index_16") == "1" then
return true
else
return false
end

if I put something like that in the lua state than the refresh does not work.
only when the var "Audio_Zone" change


local helper = NetRemote.GetVariable("Audio_Zone")
local helper2 = "Allen_OutGain.index_" .. helper

if NetRemote.GetVariable(helper) == "1" then
return true
else
return false
end

but I need the state change when the "Allen_OutGain.index_(dynamic)" change.

Is this possible?

Rob H
October 7th, 2009, 10:18 AM
You could try



if NetRemote.GetVariable([[Allen_OutMute.index_<Audio Zone>]]) == "1" then
return true
else
return false
end