Saving Internet Web Pages

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
robbie
Newbie
Posts: 4
Joined: Thu Jan 20, 2005 5:13 pm
Location: Milwaukee, Wisconsin USA
Contact:

Saving Internet Web Pages

Post by robbie » Thu Jan 20, 2005 6:20 pm

I have recently downloaded the trial version and I'm sure I will register shortly but there is something I've been trying to automate for sometime without any success.

My hobby is greyhound handicapping, my trade is a VB programmer. I'm trying to download allot of race results and I need to figure out how to launch internet exporer, goto a certain web site, authenticate (log myself in), navigate to another web page, simulate the File:Save As click, change the file name and the save as type, goto another web page, simulate the File:Save As click, etc...

For some reason, I can't get the trial version to do this. Any ideas as to why???

Plus, I would like to be able to develop a program that creates these scripts that the program will eventually run. Can I do that?

One more thing, how can I make sure the entire web page is downloaded before performing my save as routine?

Any help on this would be greatly appreciated... :D

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

Post by support » Thu Jan 20, 2005 8:03 pm

Check out the web form submission script in Scripts & Tips. Alternatively use the HTTPRequest command.
MJT Net Support
[email protected]

robbie
Newbie
Posts: 4
Joined: Thu Jan 20, 2005 5:13 pm
Location: Milwaukee, Wisconsin USA
Contact:

Post by robbie » Thu Jan 20, 2005 11:03 pm

Thanks for the help but I was hopeful to simulate exact steps. The reason is, I have a parsing app that is already designed to extract the data from the html code.

Another question if I may. I'm MCP certified in Visual Basic. I've never used VBScript. How close, if not 100% is VBScript code from VB Code?

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

Post by support » Thu Jan 20, 2005 11:30 pm

Hi,

You can still simulate the steps. But if you have a parsing app then you'll be better off downloading the source of the page to a file which HTTPRequest will do. VBScript/IE/ActiveX can also do this. Or you can simulate it, or have a combination of VBScript/IE/ActiveX submit the form and then use simulation to extract the source. Many ways to do it, all possible and many examples on this forum for automating IE or using HTTPRequest.

If you're MCP certified in Visual Basic than you'll find VBScript child's play. It's the same syntax but much less functions. You'll find links to the documentation at http://www.mjtnet.com/resources.htm
MJT Net Support
[email protected]

robbie
Newbie
Posts: 4
Joined: Thu Jan 20, 2005 5:13 pm
Location: Milwaukee, Wisconsin USA
Contact:

Post by robbie » Fri Jan 21, 2005 2:27 pm

Thanks for all your help. I'm confident I will be able to design something really nice. I will be registering my demo when I get home from work today. Keep up the great work!

PS: Your resources for VBScript........FANTASTIC! Normally, I'm the kind of person who runs out to Barnes & Noble the minute a need a manual for a certain technology. You may have saved me a few bucks! Thanks.

robbie
Newbie
Posts: 4
Joined: Thu Jan 20, 2005 5:13 pm
Location: Milwaukee, Wisconsin USA
Contact:

Post by robbie » Sat Jan 22, 2005 4:55 pm

I'm still having trouble. Here is my script:

VBSTART
DIM IE

Sub CreateIE
Set IE = CreateObject("InternetExplorer.Application")
IE.Visible = 1
End Sub

Sub Navigate(URL)
IE.Navigate URL
do while IE.Busy
loop
End Sub

VBEND

VBRUN>CreateIE
VBRUN>Navigate,http://www.rosnet2000.com/rx_asp/rosmain.asp
Wait>1
Ask>Web Page Loaded - Did You Login?,r
If>r=YES
VBRUN>Navigate,http://www.rosnet2000.com/rx_asp/rx_Res ... 005&aSig=A
Wait>3
else
Exit
endif

Press ALT
Send Character/Text>F
Release ALT
Send Character/Text>A
Send Character/Text>C:\Greyhounds\Results\SL\2005\SL0119A.htm
Press Tab
Press Down * 3
Press Enter * 2

VBRUN>Navigate,http://www.rosnet2000.com/rx_asp/rx_Res ... 005&aSig=E
Wait>3
Press ALT
Send Character/Text>F
Release ALT
Send Character/Text>A
Send Character/Text>C:\Greyhounds\Results\SL\2005\SL0120E.htm
Press Tab
Press Down * 3
Press Enter * 2

Exit


After I login, it goes to my first web page and saves the page just the way I want, then, I get the following error message: (:-2147024726 Line 10, Column 1). After I click ok from the error message, it basically saves the same web page again but this time with the 2nd web page filename! It never navigates to the 2nd web page. Now, I have 1 web page saved with 2 different names which isn't what I am trying to do.

2 things. I'm concerned (naturally) about the error dialog box that pops up and why can't I navigate to my next web page? While I'm doing my work, I would like to point out that I only want one instance of IE running while I'm saving my pages. Any ideas???

Rob

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