Jump to content

Recommended Posts

Posted

Hey guys, some of you may remeber, when I posted a very slopy Dopplar radar script. It was last Winter I beleive. Well, I basically use it everyday, it has proved itself very useful, so i decided to clean it up a bit :evil: I know I could "add" stuff to it, but it's much cleaner now, and functions correctly... Have a look, nice and simple, the way I like it.

Global $echo
$gui = GUICreate("Dopplar Radar", 700, 485)
GUISetState()
InetGet("http://image.weather.com/web/radar/us_nyc_closeradar_large_usen.jpg", @TempDir & "\dopplar.jpg", 1, 0)
GUICtrlCreatePic(@TempDir & "\dopplar.jpg", 0, 0, 700, 485)
AdlibEnable("_GetEcho", 30000)

While 1
   $get = GUIGetMsg()
   If $get = -3 Then Exit
WEnd

Func _GetEcho()
   InetGet("http://image.weather.com/web/radar/us_nyc_closeradar_large_usen.jpg", @TempDir & "\dopplar.jpg", 1, 0)
   GUICtrlSetImage($echo, @TempDir & "\dopplar.jpg")
EndFunc  ;==>_GetEcho

Func OnAutoItExit()
   GUIDelete($gui)
   FileDelete(@TempDir & "\dopplar.jpg")
EndFunc  ;==>OnAutoItExit

:)

Comments, suggestions, criticism, all will be taken! :D

FootbaG
Posted

Not bad, would it be possible to get the radar scope of an area based on zip code maybe? (I don't know how weather.com does their thing)

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Posted

I'll get back to you when I got home and see what I can do! Sorry, we're leaving to go golfing! (I don't really like golfing that much, it's OK, but, me and my sister made a money bet, so I'm in :))

FootbaG
Posted (edited)

I went over to weather.com, and apparently with the url format http://www.weather.com/weather/map/32701, you can plug in any zip code, and it will pull up the 600-mile dopplar on the page, then just use InetGetSource and then InetGet for the image? That or a COM object...(dev forum I believe)

Edit:

Ok, I've been playing with it (I have nothing else to do :) ) and have a working version, but it isnt' as fast as your version, it has to download two pages to get the url)

I've attached a working version, all it needs is a zip code. I'll let you pretty it up if you want...I'm too lazy and just did InputBox and what not...

radar.zip

Edited by MSLx Fanboy

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())
Posted

Hmm... This looks like a tough one. I thought it'd be easier, quite the opposite...

FootbaG
Posted

Yea, they use frames, and unfortunately, the frame containing the image does not have any direct use of the zip code in it's url...

Writing AutoIt scripts since

_DateAdd("d", -2, _NowCalcDate())

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
×
×
  • Create New...