0
Answered

Setting Button hit type via script

Nikolay Arbuzov 9 years ago in General updated by Ekaterina (head of support) 9 years ago 3
Hello,

Is there a way to set a 'Hit' type to Pass Through via Script? Button also creted via script and it cover some other object
on the page. Newly create button is just indicative element. But it blocks the underlaying element from being pressed.

Thank you!
Answered
Hello

IR.GetItem("Page 1").GetItem("Item 1").Hit = 2;  // Pass Through
IR.GetItem("Page 1").GetItem("Item 1").Hit = 0;  // Active Touch
Ekaterina,

Does not look like it is working. Attached a sample project that sets Hit = 2 to newly created button. But second time the original button pressed
macro function is not being called. I got it working with the workaround - adding listener to newly created button, but this is a lot inconvinient.

Thanks.

sound_button_test.irpz
Please see this sample:
SetHit.irpz

If you;ll not be able to repeat it, I'll see your project, but please check it again first. This property of item can be set up properly via the script on 2.2.3