warning window bypass

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
TommyJ
Newbie
Posts: 11
Joined: Tue Sep 30, 2003 8:59 pm

warning window bypass

Post by TommyJ » Tue Oct 07, 2003 4:51 pm

i want my macro to recognize when a warning window comes up because i try to setfocus to a window that's not open.

if the warning pops up i want to send an error flag to a field in excel and click ignore to the warning so the macro can continue... any ideas how i can do this?

Lumumba

Post by Lumumba » Tue Oct 07, 2003 8:31 pm

Code: Select all

Let>WW_TIMEOUT=5
WaitWindowOpen>Error*
If>WW_RESULT=TRUE,SetExcelFlag
..
..
Label>SetExcelFlag
Message>Error starting my application!
now you (the script) can set the flag, push the button etc. ...

TommyJ
Newbie
Posts: 11
Joined: Tue Sep 30, 2003 8:59 pm

Post by TommyJ » Tue Oct 07, 2003 8:40 pm

thanks for the help, i just figured out a good workaround so i didn't try your code, but i have another question about your answer.

the error i was getting is because the window i wanted to set the focus to didn't exist. it doesn't seem like your solution would allow me to close the warning from that...

the more i think about it, the more i think there is no way to close that window automatically and you have to come up with a workaround.

am i wrong?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue Oct 07, 2003 9:42 pm

TommyJ commented:
...the more i think about it, the more i think there is no way to close that window automatically and you have to come up with a workaround.
Maybe you did not see the extra line of code in the middle?
Let>WW_TIMEOUT=5
WaitWindowOpen>Error*
If>WW_RESULT=TRUE,SetExcelFlag
..
..
Label>SetExcelFlag
PushButton>Error*,OK
Message>Error starting my application!

If PushButton> does not work, maybe you could try:
SetFocus>Error*
Press ALT
Press F4
Release ALT
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts