I can't run my script to automate some Web processes unattended. Every time I leave it running for any extended period unattended, I would come back to some alert boxes needing a click on "ok". How do I detect these elements? For instance, the Web site goes into maintenance and pops up an alert box. What is the best way to handle this or similar types of occurrences?
________
mexicocity hotel
Is there a script to detect message or alert boxes?
Moderators: Dorian (MJT support), JRL
-
- Newbie
- Posts: 10
- Joined: Wed Apr 18, 2007 5:51 pm
Is there a script to detect message or alert boxes?
Last edited by usernamechan on Tue Feb 01, 2011 12:27 pm, edited 1 time in total.
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Use a WINDOW_OPEN OnEvent handler to detect and process dialogs that appear randomly.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
-
- Newbie
- Posts: 10
- Joined: Wed Apr 18, 2007 5:51 pm
Can anyone give an example on how to use OnEvent to detect and process some random dialog?
________
Mercedes-Benz 600 (disambiguation) specifications
________
Mercedes-Benz 600 (disambiguation) specifications
Last edited by usernamechan on Tue Feb 01, 2011 12:27 pm, edited 1 time in total.
Taken from the help file:
Search for OnEvent in the help file or use the online help section at http://www.mjtnet.com/onlinehelp.htm
Code: Select all
OnEvent>WINDOW_OPEN,Notepad*,2,DoNotepad
Label>start
Wait>1
If>NotepadOpen=1
Message>Notepad is open
Else
Message>Notepad is not open
Endif
Goto>start
SRT>DoNotepad
Let>NotepadOpen=1
END>DoNotepad