На рассмотрении

Listener for status change?

AlejandroG 12 месяцев назад обновлен Vladimir Ovchinnikov 11 месяцев назад 5


Is there a way in iridium script to  add a listener for every time an item changes its status?

I added an script call to a function every time the circular level is moved, but I want to call the function only when the status changes.


На рассмотрении


IR.SetGlobalListener(IR.EVENT_GLOBAL_TAG_CHANGE, function(name, value)
IR.Log("Global Listener Activated: " + name + "\tValue: " + value);
IR.SubscribeTagChange("UI.Page 1.Item 2.Value");

The listener is triggered when the Value is changed.

Thank you, 

But I would like to trigger a listener when the status of a multistate lever is changed, not the value.


Item does not have this property. Available properties are listed here. Please specify what you mean by status.



For EditBox, there is an EVENT_ITEM_CHANGE event that is triggered when you enter text in EditBox. Similar events are not provided for other Item types. You can use SetInterval to do GetState, but this is a suboptimal solution to the problem.

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