10-06-2015, 04:20 PM
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.
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.
