Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Clicking a button in a dialog
#2
You probably use a window trigger. Then instead of
int wMain=win(...)
can be
int wMain=TriggerWindow
The first is correct too, but the second is more reliable and fast.

Then, I guess that the button is initially disabled. Then the macro can wait until it is enabled:
int wButton=wait(30 WE child("" "*.BUTTON.*" wMain 0x0 "wfName=button3"))

Then close the window:
clo wMain

Or, if want to click the button:
but wButton

If waiting for enabled button does not work, try dialog "Find image". There select "Wait"...
Also can wait for accessible object state, but in this case it probably would work only if waiting for enabled works.


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)