0
Beantwoord
Can I AddListener on System or Project Tokens change or update?
Tanapol E. 7 jaar geleden
in Applications / i3 Pro
•
bijgewerkt door Dmitry - support (expert) 7 jaar geleden •
2
Can I AddListener on System or Project Tokens change or update?
I try to do something like this
if(IR.GetVariable("System.Battery.Level") < 25)
{
IR.GetPage("pg_main").GetItem("label_battery").GetState(0).FillColor = 0xFF0000FF
}
Customer support service by UserEcho
Now i use this one:
is there anyway to AddListener directly to token?
IR.SetGlobalListener(IR.EVENT_GLOBAL_TAG_CHANGE, function(name, value)
{
//Do stuff<
});
IR.SubscribeTagChange("System.Battery.Level");
Hello!
Unfortunately, there are no special listeners for tokens, so it's better to use a global listener like you did