help with a web page

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
bhogue
Newbie
Posts: 9
Joined: Fri Jul 08, 2005 5:25 pm

help with a web page

Post by bhogue » Fri Jul 22, 2005 7:47 pm

Thanks to a previous post, I can invoke IE and bring up the desired web page. Unfortunately the subsequent SEND and PRESS do not appear to accomplish anything. Help! The relevant lines from my macro are

Run Program>c:\program files\internet explorer\iexplorer.exe "webPage"
WaitWindowOpen>internet explorer*
SetFocus>internet explorer*
Send>%organizationId%
Press Tab
Send>%userId%
Press Tab
MessageModal>ending

I see the browser open to the desired page. Next I see the "ending" box from the MessageModal. The web page has not changed.

-brian

Me_again
Automation Wizard
Posts: 1101
Joined: Fri Jan 07, 2005 5:55 pm
Location: Somewhere else on the planet

Post by Me_again » Fri Jul 22, 2005 8:00 pm

It won't necessarily fix your issue but as I learned from support in this thread http://www.mjtnet.com/usergroup/viewtop ... lorer+busy waitwindowopen is not a reliable way to wait for a webpage to load. The correct way is to use IE's own busy function.

Sub OpenPage(URL,Wait)
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.navigate URL

do while IE.Busy and Wait
loop
End Sub

fightcancer
Macro Veteran
Posts: 252
Joined: Fri Apr 15, 2005 8:32 am

Post by fightcancer » Thu Aug 11, 2005 10:31 am

using the idea of looping while IE is busy, how would I use the VB SET statement to definite IE as a window that is already open as opposed to creating a new instance of IE?

thanks a bunch!

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Thu Aug 11, 2005 10:39 am

You can't. Normally you would use GetObject instead of CreateObject but GetObject isn't supported by Internet Explorer. So you need to create the window you automate.
MJT Net Support
[email protected]

fightcancer
Macro Veteran
Posts: 252
Joined: Fri Apr 15, 2005 8:32 am

Post by fightcancer » Thu Aug 11, 2005 12:45 pm

ok. thanks again for all the help. :D

I guess as a work around I'll have the macro copy the URL from the browser window, close it, then create a new browser window w/the existing IE.Busy script and navigate to that copied URL.

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