how to "clic" a opened window button ?

Hi
I want to automate some actions, and I would like to "clic" on a opened window button.
I look at "dialogMonitorOps",and "UIAccessor" is it a solution ?

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

If the window is not created by you or you can't read the code that creates the window then use "dialogMonitorOps" and "UIAccessor".
If the window is created by you or you can read the code of the script then you can click the desired button directly. For example:

(
 global myRollout
 rollout myRollout "My Roll"
 (
  button btn_01 "Press me"
 
  on btn_01 pressed do
  (
    print "I was pressed"
  )
 )
 createDialog myRollout
)

To press the btn_01 from any other code(script) use this:

myRollout.btn_01.pressed()
titane357's picture

Thanks for answer, hope

Thanks for answer, hope you're on hollidays.

miauu's picture

.

At work unfortunately. On January 1 also - 24h shift. :)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.