Setting Button hit type via script

Nikolay Arbuzov 5 лет назад в General обновлен Ekaterina (head of support) 5 лет назад 3

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!

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

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.


Please see this sample:

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

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