I am trying to make a macro to click through an error message in an email forwarding app I have.
The idea is to get the macro to run when the error window pops up. I've been using the "advanced schedule>window event" option to do this, but I can't get it to work. It might be because the main window and the error window have the same name. (or perhaps because I'm a noob)
At the moment the macro runs as soon as I click "ok" on the settings dialogue- I think because the Mail Forward window is already open it thinks it's time to boogie, when actually the error message hasn't popped up yet.
Here's the code I've been trying, it probably doesn't make any sense.
Let>WF_TYPE=3
Let>WW_TIMEOUT=2
CapsOff
MouseMove>579,766
WaitWindowOpen>Mail Forward
FindWindowWithText>error,1,Mail Forward
MoveWindow>Mail Forward,389,164
ResizeWindow>Mail Forward,360,134
Wait>0.01
MouseMove>626,275
Wait>0.5
LClick
...am I along the right lines?
Triggering macro on window event
Moderators: Dorian (MJT support), JRL
If the main window has the same name as the window you are trying to close, then you could first rename the main window , then use the Window Event in the macro properties.
Open the main program, then open ViewSystemWindows and find the window name (search for "MyWindow" for example) then use the SetControlText command (explained in help) to change the main window name (say maybe "MyMainWindow")...
Now things should work like you've been expecting.
I've had success with this before, but there is a chance your app may not be so easy to manipulate.
Open the main program, then open ViewSystemWindows and find the window name (search for "MyWindow" for example) then use the SetControlText command (explained in help) to change the main window name (say maybe "MyMainWindow")...
Now things should work like you've been expecting.
I've had success with this before, but there is a chance your app may not be so easy to manipulate.