0
Answered

Getting name of the button with function.

TuomoHautala 9 years ago in iRidium Script updated by Dmitry - support (expert) 8 years ago 4
Is there any way to get information about pressed button name with function and script call and to put it to IR.Log?

Under review
Hello!

the name of any pressed button on the page you can get using the following functions:

for(var i = 0; i < IR.GetItem("Page 1").ItemsCount; i++){
IR.AddListener(IR.EVENT_ITEM_PRESS,IR.GetItem("Page 1").GetItem(i), press, IR.GetPage("Page 1").GetItem(i) );
}

function press(){

IR.Log(this.Name);
}

Is it possible to create funtion and use it with script call and log the name of the button with it?

Hello!


Unfortunately, to get the name of the pressed button is possible only with the help of a script that is written above.