qazzyguy Posted December 2, 2009 Posted December 2, 2009 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
CounterCraft Posted December 2, 2009 Posted December 2, 2009 (edited) #include <GUIConstants.au3> #include <IE.au3> Opt ("TrayIconHide", 1) $PanTask = _IECreateEmbedded() GUICreate("Weather Report", 800, 600) $PanGUI = GUICtrlCreateObj($PanTask, -62, -136, 1024, 1024) GUISetState() _IENavigate ($PanTask, "http://www.weather.com/outlook/health/allergies/hourbyhour/graph/11230?from=tenDay_topnav_undeclared", 0) While 1 $GUI = GUIGetMsg() Select Case $GUI = $GUI_EVENT_CLOSE Exit EndSelect WEnd you can edit GUICreate("Weather Report", 800, 600) to GUICreate("Weather Report", 600, 500) to get smaller box Edited December 2, 2009 by CounterCraft
qazzyguy Posted December 2, 2009 Author Posted December 2, 2009 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.
FuryCell Posted December 2, 2009 Posted December 2, 2009 (edited) Did you try InetRead in the latest beta or InetGetSource? MsgBox(0,"",BinaryToString(InetRead("http://www.weather.com/outlook/health/allergies/hourbyhour/graph/11230?from=tenDay_topnav_undeclared"))) Edited December 2, 2009 by P5ych0Gigabyte HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code.
qazzyguy Posted December 3, 2009 Author Posted December 3, 2009 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") FileDelete("weather.html") FileWrite("weather.html", $txt) ;run("checker.exe") ;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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now