Jump to content
Sign in to follow this  

Retrieve webpage without opening up a IE session

Recommended Posts


I'm trying to write a script that retrieves the html code of a page, compares it to the last saved point and if it's different retrieves it again.

Basically I want to retrieve the html code of the weather (since I usually am in a rush in the morning and my internet is slow, I don't want to have to wait), thats the part I need help on, the comparing part I can write a c++ code that goes through it div by div.

I want to do this in the background so I can't use _IECreate.

The TCPStartUp() documentation is very confusing and I just want to send a simple get command of http://www.weather.com/outlook/health/allergies/hourbyhour/graph/11230?from=tenDay_topnav_undeclared

Share this post

Link to post
Share on other sites

#include <GUIConstants.au3>
#include <IE.au3>
Opt ("TrayIconHide", 1)

$PanTask = _IECreateEmbedded()
GUICreate("Weather Report", 800, 600)
$PanGUI = GUICtrlCreateObj($PanTask, -62, -136, 1024, 1024)
_IENavigate ($PanTask, "http://www.weather.com/outlook/health/allergies/hourbyhour/graph/11230?from=tenDay_topnav_undeclared", 0)

While 1
    $GUI = GUIGetMsg()
        Case $GUI = $GUI_EVENT_CLOSE

you can edit

GUICreate("Weather Report", 800, 600)


GUICreate("Weather Report", 600, 500) to get smaller box

Edited by CounterCraft

Share this post

Link to post
Share on other sites

I'm trying to to this all in the background, I don't want to constantly have a window open, I want to be able to to double click an html file on my desktop when I need to.

Share this post

Link to post
Share on other sites

Did you try InetRead in the latest beta or InetGetSource?

Edited by P5ych0Gigabyte

HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.

Share this post

Link to post
Share on other sites

Yes I got it

#include <Inet.au3>

;start loop here
$txt = _INetGetSource("http://www.weather.com/outlook/health/allergies/hourbyhour/graph/11230?from=tenDay_topnav_undeclared")
FileWrite("weather.html", $txt)
;sleep for 10 minutes
;start loop again

You get the point, I have to start working on an effiecent c++ program that ignores changes in time and stuff like that, and one that renames all static included files (gif, js) into same folder notation and also have to download all external files too.

I'll prob just use curls library tho for the same price

Thanks for the help

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.