Non Modal Dialog

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
SWhitsell
Newbie
Posts: 6
Joined: Wed Nov 19, 2003 3:38 pm

Non Modal Dialog

Post by SWhitsell » Tue Feb 10, 2004 2:08 pm

I have a script that needs to wait for an error message that may or may not appear. If it does not the message box goes away in two minutes. I would also like to react to the OK button on the message box and drop out of MainLoop. Below is the code any suggestions will be appreciated.

Let>MSG_STAYONTOP=1
Let>MSG_CENTERED=1
Let>WW_TIMEOUT=60

Let>Counter= 0
Message>Waiting Two Minutes for "At Least One Service Failed Message"

Label>MainLoop
Wait>0.5
FindWindowWithText>failed during,1,WindowName
If>WindowName=Service Control Manager ,FoundWindow
Let>Counter=Counter+1
if>Counter>120,NotFound
Goto>MainLoop

Label>FoundWindow

//Now Close the Service Control Manager Message
SetFocus>Service Control Manager*
Wait>0.5
MouseMoveRel>199,91
Wait>0.5
LClick
Label>NotFound

//This will close the message Window
SetFocus>Macro Scheduler Message
Wait>0.5
MouseMoveRel>133, 176
Wait>0.5
LClick

Lumumba

Post by Lumumba » Tue Feb 10, 2004 5:36 pm

Is there any issue with that script? Beside, that I would prefer to set the focus to a button via it's shotcut character (if one is assigned) instead of a MouseMoveRel> - it seems to look fine!

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