0
Отвечен

Can I AddListener on System or Project Tokens change or update?

Tanapol E. 7 лет назад в Приложения / i3 Pro обновлен Dmitry - support (expert) 7 лет назад 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

}


 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

Сервис поддержки клиентов работает на платформе UserEcho