Jump to content

Advanced Dopplar


layer
 Share

Recommended Posts

  • Replies 45
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

this will show the 36 hour forecast, but only shows twelve of the zip code.

in other words change the 44306 to your zip code

sorry all i think this only works in the US.

well any ways give it a try.

FileDelete (@TempDir & "\36.htm")
FileDelete (@TempDir & "\36.dat")
InetGet("http://www.weather.com/weather/hourbyhour/44306", @TempDir & "\36.dat",1,0)
#include <file.au3>
Dim $aRecords
If Not _FileReadToArray(@TempDir & "\36.dat",$aRecords) Then
MsgBox(4096,"Error", " Error reading log to Array    error:" & @error)
Exit
EndIf
For $x = 1 to $aRecords[0]
$retun = StringInStr($aRecords[$x], "<!-- content -->")
if $retun > 0 then
FileWrite(@TempDir & "\36.htm", $aRecords[$x])
Do
$ending = StringInStr($aRecords[$x], "<!-- END Hourly Forecast Module -->")
$x=$x+1
$iggy = StringInStr($aRecords[$x], "a href=")
if $iggy <> 0 then
else
FileWrite(@TempDir & "\36.htm", $aRecords[$x])
endif
Until $ending <> 0
endif
Next
$registry = RegRead("HKEY_CLASSES_ROOT\http\shell\open\command", "")
$text = StringReplace($registry, '"', "")
Run ( $text &" "&@TempDir & "\36.htm" , "", @SW_MAXIMIZE)
Link to comment
Share on other sites

Quick question.. this is pretty cool, but how in the heck would i set it up for Satellite Beach FL. Dopplar? (zip 32937) or Melbourne (closest Major city). I am new at this script stuff... so I'd rather get your opinion before adjusting your script. Thanks.

Link to comment
Share on other sites

Hmm, it's simple, all you do is look at the URL's in the script, and replace them with the URL's (from www.weather.com) that fit your area/needs... Theres actually not much to change since all you have to change is the dopplar since the rest is the whole US (except for the tropics).

Edited by layer
FootbaG
Link to comment
Share on other sites

I am getting some starnge display results. The jpg are being displayed cascaded over themselves. The same image is being resized over the current image at a smaller size.

Also noticed that it does not happen in the Scite beta run only as a compiled or when I select the au3 and run it.

Thoughts?

Link to comment
Share on other sites

Guest Mixture63

Nice. 5 stars. :P

Now you look at my stuff? :lmao:

Edit: I don't understand why nobody rated your work. But I give it 5 stars cuz I like it, and it is worthy of 5 stars.

Edited by Mixture63
Link to comment
Share on other sites

^ I think there was 5 stars before... Might be because in general it's a simple useful tool...

@TWC,

I've had this happen to me too. This means you're probably running this script with the main release (3.1.1.0), correct ? If so, you need the BETA to run it to fix the cascaded images. Somewhere along the line the bug was fixed, so all should work well ! Post back with results, thanks :P

Edited by layer
FootbaG
Link to comment
Share on other sites

Guest Mixture63

^ I think there was 5 stars before... Might be because in general it's a simple useful tool...

@TWC,

I've had this happen to me too. This means you're probably running this script with the main release (3.1.1.0), correct ? If so, you need the BETA to run it to fix the cascaded images. Somewhere along the line the bug was fixed, so all should work well ! Post back with results, thanks :P

No. I don't recall a rating before I rated it.

Link to comment
Share on other sites

Hmm... I think that can be done.. I remeber an example to show if you were connected to the internet or not, but cannot find it... Does anyone know where that was ?

Cheers :P

Yup:
Func _INetActive()
    INetGet("http://www.google.com")
    Return not @error
EndFunc
Link to comment
Share on other sites

Good script Layer, and a good idea!

I have attached a script here called weatherdesk.au3 that is a modification from your original. I hope you all find the enhancements useful. Beta required

Mods include:

- GUI size and images modified to 600px

- ping routine to test for Internet connection and warn if none is found

- Menu system put in place to switch between US National and 9 additional regional forecasts

- Buttons change with selection of national or regional forecasts to display proper button choices

- Menu titles change to let you know what region and forecast is selected

- Menu system designed around an array to easily update the selected status

- When menu selection changes, the selected forecast changes to reflect the new region

- Function added to refresh forecast so the timer restarts when a new forecast is selected

- Refresh interval set by variable

- Forecast areas set by variable and string concat to make it easier if the weather chanel changes image locations.

Code is commented and an icon is also attached to this post.

Comments are welcomed.

Happy New Year!

billmez

Edit: 1/2/06 new weatherdesk.au3 file uploaded - see later post

Edit 1/3/06 uploaded weatherdeskR.au3 that allows resizing of window and images. See reply to layers post following this.

Icon1065.ico

weatherdesk.au3

weatherdeskR.au3

Edited by billmez
Link to comment
Share on other sites

Whoa ! I'm VERY impressed. I LOVE IT. Honestly, I'm REALLY excited. Expecially since things didn't go well tonight, this is like, really exciting for me.

One issue though:

When I resize the GUI, I lose the Tropics and Severe button. And I'm thinking that maybe the picture should grow or shrink when the GUI is resized. But that's completley optional because I don't know how the picture will like us if we resize it too much, but I think it's worth a shot to test out.

If I come accross anything else, I will let you know ! Other than that, 10/10 ! :P Great script.

FootbaG
Link to comment
Share on other sites

  • Moderators

That's a wonderful addition there billmez!! :P

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

:lmao: Thanks guys,

I tried to figure a way to make it as useful for as many people as possible without getting insane about individual locations. At lease this way you can get a generally good idea about what is happening in your location. Face it, if there is severe weather, these maps are worthless anyway beyond a simple warning to look for more information.

Don't know about the resize issue. I figured at this size it shouldn't need it. It is a good idea though and maybe I'll look into it when I have time.

I am an AutoIt noob, so modifying scripts like this is heling me to learn it :P

I also modified the iniedit.au3 script in this forum and would appreciate any comments on it too.

http://www.autoitscript.com/forum/index.php?showtopic=19582

Also currently working on a quick and simple backup GUI shell for commonly used folders to a removable drive using the nice freeware samedir backup program. I will release it here when it's ready.

Link to comment
Share on other sites

I just uploaded an new weatherdesk.au3 file to solve the resizing problem. There is also another minor fix, testing for the existance of the GUI before trying to destroy it in the OnAutoItExit() function.

It seems that if you don't allow the window to be resized, there is no problem :">

Seriously, there does seem to be a problem with resizing GUIs containing buttons unless using a global option like Opt("GUIResizeMode", $GUI_DOCKAUTO), or setting GUICtrlSetResizing for the individual buttons.

When doing this, the buttons enlarge with the window size. Other options I tried, the buttons still seem to disappear.

Using the option above the buttons will resize with the window. The forecast picture will also resize when you drag the window size, but when you click a button or menu for another selection, the image is the original size no matter how large the window. They will, however properly size if the window is resized again.

I'll post another version as soon as I figure out how to get the new selection to fill the window also.

Link to comment
Share on other sites

layer,

I figured out how to make the resize work. I uploaded weatherdeskR.au3 to previous post. Code changes are commented.

In a nutshell:

-Set the resize option to auto: Opt("GUIResizeMode", $GUI_DOCKAUTO)

- Assigned the initial image size to variables

- Get the client window size before loading the new image on selection change

- Load the image

- Change the image ctrl size to the client window width and height (fractional).

Of course since it is a jpg image it degrades badly with great upsizing, but I think this is what you were looking for.

let me know what you think or if you know of a better way to do this.

billmez

Whoa ! I'm VERY impressed. I LOVE IT. Honestly, I'm REALLY excited. Expecially since things didn't go well tonight, this is like, really exciting for me.

One issue though:

When I resize the GUI, I lose the Tropics and Severe button. And I'm thinking that maybe the picture should grow or shrink when the GUI is resized. But that's completley optional because I don't know how the picture will like us if we resize it too much, but I think it's worth a shot to test out.

If I come accross anything else, I will let you know ! Other than that, 10/10 ! :P Great script.

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

is there a way to add a nexrad radar map.

here is a link for the map

Atlanta NExrad

If you click on the view/save image link at the bottom of the radar, you come up with an image URL of: http://radblast.wunderground.com/cgi-bin/r...w=0&lightning=0

You could just replace one of the InetGet calls in the _GetEcho() function with the above image URL. Note that only the first two buttons remain static, the others change depending on what region you select.

This line will replace the US radar button with the above radar, but not when the prog first loads, you have to click on it.

InetGet("http://radblast.wunderground.com/cgi-bin/radar/WUNIDS_map?station=FFC&brand=wui&num=1&delay=15&type=N0R&frame=0&scale=0.750&noclutter=0&t=1138278802&lat=33.85500717&lon=-84.39598846&label=Atlanta,+GA&showstorms=0&map.x=400&map.y=240&centerx=323&centery=273&transx=-77&transy=33&showlabels=1&severe=0&rainsnow=0&lightning=0", @TempDir & "\WeatherMaps\pic1.jpg", 1, 0)
Edited by billmez
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...