Hey guys, I am tearing my hair out trying to solve what should be a simple problem.
I recently decided to use Internet Explorer instead of Google Chrome for one of my macros. However, things are not working out quite right.
When I run the macro, it starts up Internet Explorer and navigates to the correct page. Later in the the process, the macro clicks on one of the links in the page and brings up a second page. While focused on the second page, I copy all the data and process it as needed. Then I go to close the page, and this is where the trouble begins.
In Google Chrome, a simple ctrl-w will do the job of closing the window. But when I try to close the window in Internet Explorer, nothing happens. I even tried an alternative of using alt-f and closing the page via the drop-down menu - nothing happened. I know that the page is properly focused, because if I execute a ctrl-a, the page is correctly highlighted.
What, oh what am I doing wrong?
Here is the subroutine which I execute to attempt to close the second window.
SRT>CloseASHXTab
SetFocus>ujsportal.pacourts.us*
MouseMove>15,300
Wait>.5
LClick
Wait>.5
//
Press LCTRL
Wait>.5
Send>w
Wait>.5
Release CTRL
Wait>.5
WaitWindowClosed>ujsportal.pacourts.us*
END>CloseASHXTab
When is a window not a window? When it won't CLOSE!
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Re: When is a window not a window? When it won't CLOSE!
This works great for me:
Every time I run that the active tab closes, until IE quits altogether. This also works:
As does:
(where MS UK: Latest News is the beginning of the window title for the particular tab I want to close.
Code: Select all
SetFocus>Internet Explorer*
Press CTRL
Send>w
Release CTRL
Code: Select all
SetFocus>Internet Explorer*
Press ALT
Send>fc
Release ALT
Code: Select all
CloseWindow>MSN UK: Latest news*
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?
Re: When is a window not a window? When it won't CLOSE!
Thank you Marcus,
I will give those suggestions a try. Right now I am forced to close the window with a MouseMove and LClick, not the most elegant solution....
I will give those suggestions a try. Right now I am forced to close the window with a MouseMove and LClick, not the most elegant solution....