responding to modal message box.

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
Mechellallen
Newbie
Posts: 2
Joined: Wed Oct 01, 2008 9:14 pm

responding to modal message box.

Post by Mechellallen » Wed Oct 01, 2008 9:33 pm

The macroScheduler script I have is stopping once a modal message box pops up. I'm unable to send a response and/or close a window until the message is responded to outside of macro scheduler. Once I respond to the message box the macro scheduler script will continue.
Mechellallen

User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Oct 01, 2008 10:11 pm

That's pretty much the way MessageModal> is supposed to work.

From help for MessageModal>
Displays a message box containing the text specified in message_text. With this command the Message box is modal. This means that the script will not continue until OK is pressed. For non modal message boxes use Message.
If you need a message box that responds in a special way you might try creating your own message using the dialog functions. Or you could use Rain'smessage box wizard located here

Hope this helps,
Dick

Mechellallen
Newbie
Posts: 2
Joined: Wed Oct 01, 2008 9:14 pm

responding to modal message box

Post by Mechellallen » Thu Oct 02, 2008 12:47 pm

I'm not creating the modal window. I'm automating/stepping through a process that causes the modal window to pop up and am unable to close it. I've tried several different actions:

WaitWindowOpen>Generate Purchase Order
MoveWindow>Generate Purchase Order,519,421
Wait>1.06
PushButton>Generate Purchase Order,Generate
WaitWindowOpen>Message
SetFocus>Message
Press Enter

and
WaitWindowOpen>Message
PushButton>Message,OK

and
WaitWindowOpen>Message
SetFocus>Message
CloseWindow>Message

and
PushButton>Generate Purchase Order,Generate
Press Enter
Mechellallen

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 » Thu Oct 02, 2008 3:41 pm

Try adding a "*" to the end of each of the window names in your script.

For example: WaitWindowOpen>Generate Purchase Order*

What happens when you single step, where do you have a problem?Which command is triggering a modal window? What program is generating it?
Do you have a log file?

Again, Modal Windows must be responded to before you can proceed, that is normal functioning.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Thu Oct 02, 2008 9:09 pm

Try removing all PushButton statements and replacing with key sends or mouse clicks. I have seen PushButton put applications into strange states - not all of them seem to be able to cope with the button push message at that lower level, whereas simulating user input is fine.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

yenprice
Newbie
Posts: 10
Joined: Wed Oct 01, 2008 6:33 am
Contact:

Post by yenprice » Tue Oct 28, 2008 5:43 am

I ran into a similar situatiion. I work around it by using MouseMove and LClick the button that cause the modal window to pop up, then use MouseMove and LClick again to close the modal window. If the locations of your button and the pop-up window are static, you can use this method. If they appears at different places at different time, then FindImagePro will work.

Hope this help
Yen N Price

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Tue Oct 28, 2008 8:43 am

yenprice wrote:I ran into a similar situatiion. I work around it by using MouseMove and LClick the button that cause the modal window to pop up, then use MouseMove and LClick again to close the modal window. If the locations of your button and the pop-up window are static, you can use this method. If they appears at different places at different time, then FindImagePro will work.

Hope this help
MouseMoveRel is another way. Moves the mouse to a position relative to the upper left position of the active window. So doesn't matter where the window is.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

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