layer Posted December 26, 2004 Share Posted December 26, 2004 (edited) hey guys, the pictures are from weather.com in case it's copyright... #include <GUIConstants.au3> GUICreate ("Dopplar Radar", 700, 485) GUISetState () Func GetEcho () InetGet ("http://image.weather.com/web/radar/us_nyc_closeradar_large_usen.jpg", @DesktopDir & "\dopplar.jpg", 1, 0) EndFunc While 1 $get= GUIGetMsg () Select Case $get= -3 Exit EndSelect GetEcho () GUICtrlCreatePic (@DesktopDir & "\dopplar.jpg", -1, -1, 700, 485) Sleep (60000) WEnd i ahve a winter storm warning!! w00t, i just put it together so sry for the slopiness! sorry you cant close it until a minute is up =/ that is a minute right? sleep (100000) enjoy!!! EDIT: fixed the GUI width so you can see the weather channel logo! EDIT2: fixed the sleep amount! Edited December 27, 2004 by layer FootbaG Link to comment Share on other sites More sharing options...
phillip123adams Posted December 27, 2004 Share Posted December 27, 2004 hey guys, the pictures are from weather.com in case it's copyright...i ahve a winter storm warning!! w00t, i just put it together so sry for the slopiness!sorry you cant close it until a minute is up =/ that is a minute right? sleep (100000)<{POST_SNAPBACK}>Cool... One minute = 60 * 1000, or 60,000. Phillip Link to comment Share on other sites More sharing options...
layer Posted December 27, 2004 Author Share Posted December 27, 2004 ahhh ok, gotchya FootbaG Link to comment Share on other sites More sharing options...
sykes Posted December 27, 2004 Share Posted December 27, 2004 (edited) Very cool ... needs code to let you exit though ... either by hotkey or just allowing closing with normal clicking on the X method Edited December 27, 2004 by sykes We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
layer Posted December 27, 2004 Author Share Posted December 27, 2004 here ya go! press Ctrl+E to exit! enjoy Func Close () Exit EndFunc HotKeySet ("^e", "Close") #include <GUIConstants.au3> GUICreate ("Dopplar Radar", 700, 485) GUISetState () MsgBox (0, "Exiting", "Press Ctrl+E to exit!!!") Func GetEcho () InetGet ("http://image.weather.com/web/radar/us_nyc_closeradar_large_usen.jpg", @DesktopDir & "\dopplar.jpg", 1, 0) EndFunc While 1 $get= GUIGetMsg () Select Case $get= -3 Exit EndSelect GetEcho () GUICtrlCreatePic (@DesktopDir & "\dopplar.jpg", -1, -1, 700, 485) Sleep (60000) WEnd FootbaG Link to comment Share on other sites More sharing options...
cybie Posted December 27, 2004 Share Posted December 27, 2004 Excellent use of AutoIt to perform a basic time-saving task! I made some VERY MINOR alterations to your code and thought I would make my changes available. I removed the msgbox that came up with instructions to close, changed the shortcut to close to something that I am more familiar with that would not be used for anything else, made the window semi-transparent and organized the code a little diffently. The reason that I assigned variables to the title was to slim the size and make changes slightly easier and the reason I assigned variables to the height and width is in case you want to do any handy tricks like: $xPos = (@DesktopWidth - 700) $yPos = (@DesktopHeight - 500) to start the display ont he bottom or right side of your screen. Again, full credit for this goes back to Layer for this idea. #include <GUIConstants.au3> HotKeySet ("^{F4}", "Close") $xPos = -1 $yPos = 0 $Title = "Doppler Radar - [Ctrl+F4 to exit]" GUICreate ($Title, 700, 500, $xPos, $yPos, 0x00800000) WinSetTrans ($Title, "", 200 ) GUISetState () While 1 $get= GUIGetMsg () Select Case $get= -3 Exit EndSelect GetEcho () GUICtrlCreatePic (@TempDir & "\doppler.jpg", -1, -1, 700, 485) Sleep (60000) WEnd Func GetEcho () InetGet ("http://image.weather.com/web/radar/us_ind_closeradar_large_usen.jpg", @TempDir & "\doppler.jpg", 1, 0) EndFunc Func Close () Exit EndFunc Writing damaged code since 1996. Link to comment Share on other sites More sharing options...
sykes Posted December 27, 2004 Share Posted December 27, 2004 This is what I love about these forums. Everybody coming up with ideas and other people adding to or suggesting things to make it different or better. That's what makes this community nice to be a part of. We have enough youth. How about a fountain of SMART? Link to comment Share on other sites More sharing options...
layer Posted December 27, 2004 Author Share Posted December 27, 2004 (edited) cool cybie! good work, and half the credit gose to you for making it like that maybe ill make it so it's a pop up men so when u press ESC or something, it will pop up and you know, that would be cool, maybe ill work on it now EDIT: sykes, i totally agree with you Edited December 27, 2004 by layer FootbaG Link to comment Share on other sites More sharing options...
cybie Posted December 28, 2004 Share Posted December 28, 2004 maybe ill make it so it's a pop up men so when u press ESC or something, it will pop up and you know, that would be cool, maybe ill work on it now This program is fairly simple, but it's a hit! I have given this basic version in compiled form to a few people and they thought it was pretty cool. What I would like to do now is make GUI buttons across the top to load a different map into the window, but keep it refreshing every minute.I am working on making this work now, but if anyone else has any ideas, please bring them to the table. -again, thanks for bringing this idea out, Layer. This is fun to play with. Writing damaged code since 1996. Link to comment Share on other sites More sharing options...
layer Posted December 28, 2004 Author Share Posted December 28, 2004 haha, no problem, thats a brilliant idea though!! id like to see it when your finished! to see the buttons on the top and be able to view different maps! whoa! FootbaG Link to comment Share on other sites More sharing options...
killaz219 Posted December 28, 2004 Share Posted December 28, 2004 This is pretty interesting..But it reminds me of that annoying "WeatherBug". Link to comment Share on other sites More sharing options...
layer Posted December 28, 2004 Author Share Posted December 28, 2004 yea, i think when they say weather"bug"... i think they mean "bad bug"... but here you get to see the source and i hate spam so why would i make it? i used to have that weather bug and like everyday, my computer got, slower, and slower, and sl--o-----w----------------e---------------------------------------r... FootbaG Link to comment Share on other sites More sharing options...
cybie Posted December 28, 2004 Share Posted December 28, 2004 (edited) This is pretty interesting..But it reminds me of that annoying "WeatherBug".<{POST_SNAPBACK}> This is a cool weather tool, but is nothing like WeatherBug. WeatherBug is just a trojan, more-or-less, that happens to deliver weather news to you while it is loading your system full of it's affiliated spyware and sending your usage data back to arious vendors.Although this program also gives you weather info, it's actually just pulling an image from weather.com (or wherever you tell it to) and serving it up to you in a GUI. Techincally, you could use the exact same code to make something that shows you your websites usage statistics or virtualyl any other dynamically generated graphic on the web or on your own local network. While we are on the topic could someone tell me how to make the minimize and close buttons on the GUI work like they should??? This is something I have never dealt with and I can't seem to figure it out...Here is the code I have so far:(I need help getting close to work, as well as figuring out why the images don't switch as they should... Seems to be a problem with the loop...)expandcollapse popup#include <GUIConstants.au3> Opt("GuiOnEventMode", 1) HotKeySet ("^{F4}", "Close") HotKeySet ("{F5}", "GetDoppler") ;redesign to refresh whichever image is in window. HotKeySet ("{F1}", "Doppler") HotKeySet ("{F2}", "Current") HotKeySet ("{F3}", "Precip") $xPos = -1;center $yPos = 0 ;absolute top $Title = "Weather Station - [Ctrl+F4 to exit]" GUICreate ($Title, 720, 500, $xPos, $yPos) WinSetTrans ($Title, "", 200 );will not work on older Win OSes ; add section to allow the minimize, maximize and close to work. GUISetState () $GetMap = 1 ;set the default map as the doppler While 1 ;while open - continue looping If $GetMap = 1 Then GetDoppler () ElseIf $GetMap = 2 Then GetCurrent () ElseIf $GetMap = 3 Then GetPrecip () EndIf Sleep (5000) WEnd Func GetDoppler () InetGet ("http://image.weather.com/web/radar/us_ind_closeradar_large_usen.jpg", @TempDir & "\weather.jpg", 1, 0) GUICtrlCreatePic (@TempDir & "\weather.jpg", -1, -1, 720, 485) EndFunc Func GetCurrent () InetGet ("http://image.weather.com/images/maps/current/cur_mw_720x486.jpg", @TempDir & "\weather2.jpg", 1, 0) GUICtrlCreatePic (@TempDir & "\weather2.jpg", -1, -1, 720, 485) EndFunc Func GetPrecip () InetGet ("http://image.weather.com/images/maps/current/ec_curtemp_720x486.jpg", @TempDir & "\weather3.jpg", 1, 0) GUICtrlCreatePic (@TempDir & "\weather3.jpg", -1, -1, 720, 485) EndFunc Func Doppler () $GetMap = 1 EndFunc Func Current () $GetMap = 2 EndFunc Func Precip () $GetMap = 3 EndFunc Func Close () Exit EndFunc Edited December 28, 2004 by cybie Writing damaged code since 1996. Link to comment Share on other sites More sharing options...
Gene Posted January 7, 2005 Share Posted January 7, 2005 Hi, I have added some ideas to this, I expect to take some flack because they are not GUI, but I'm not there yet. The ideas are valid though. I look forward to comments , and flack too. I added code to show 17 local maps and a US map. It would be better to have used an INI file, but I had already done the Select statement. I'm looking for a listing of airport Ids with zip codes or vice versa, but nothing yet. If I find anything good, I'll put the info in an INI or as data pairs in a text string loaded from a file. expandcollapse popup#include <GUIConstants.au3> HotKeySet ("^{F4}", "Close") Global $sZipCode $sZipCode = ""; If you only want to see your area, put your Zip Code between ; the quotes at left. Note that not every area is configured. If $sZipCode = "" Then $sZipCode = InputBox("Zip Code", "Enter your Zip Code," & @CRLF & "or " & @CRLF & "enter 'US' for a national map." & @CRLF & @CRLF & "Note that not every area is configured.", "", "", -1, -1, 0, 0) EndIf Global $sLocalCode Select Case StringLeft ( $sZipCode, 2 ) = "27" $sLocalCode = "us_clt_" Case StringLeft ( $sZipCode, 2 ) = "60" $sLocalCode = "us_ord_" Case StringLeft ( $sZipCode, 2 ) = "10" $sLocalCode = "us_nyc_" Case StringLeft ( $sZipCode, 2 ) = "30" $sLocalCode = "us_atl_" Case StringLeft ( $sZipCode, 2 ) = "46" $sLocalCode = "us_ind_" Case StringLeft ( $sZipCode, 2 ) = "33" $sLocalCode = "us_mia_" Case StringLeft ( $sZipCode, 2 ) = "04" $sLocalCode = "us_btv_" Case StringLeft ( $sZipCode, 2 ) = "32" $sLocalCode = "us_tpa_" Case StringLeft ( $sZipCode, 2 ) = "70" $sLocalCode = "us_bix_" Case StringLeft ( $sZipCode, 2 ) = "94" $sLocalCode = "us_sfo_" Case StringLeft ( $sZipCode, 2 ) = "90" $sLocalCode = "us_lax_" Case StringLeft ( $sZipCode, 2 ) = "98" $sLocalCode = "us_sea_" Case StringLeft ( $sZipCode, 2 ) = "77" $sLocalCode = "us_gls_" Case StringLeft ( $sZipCode, 2 ) = "67" $sLocalCode = "us_ddc_" Case StringLeft ( $sZipCode, 2 ) = "23" $sLocalCode = "us_ric_" Case StringLeft ( StringUpper ( $sZipCode ), 2 ) = "US" $sLocalCode = "us" Case Else MsgBox(0, "Weather Map Zip and Location codes", "The Zip Code specified is not in the " & @CRLF & "Case statement, feel free to add it.") Exit EndSelect $xPos = -1 $yPos = 0 $Title = "Doppler Radar - [Ctrl+F4 to exit]" GUICreate ($Title, 700, 500, $xPos, $yPos, 0x00800000) WinSetTrans ($Title, "", 200 ) GUISetState () While 1 $get= GUIGetMsg () Select Case $get= -3 Exit EndSelect GetEcho () GUICtrlCreatePic (@TempDir & "\doppler.jpg", -1, -1, 700, 475) Sleep (60000) WEnd Func GetEcho () If $sLocalCode = "us" Then InetGet ("http://image.weather.com/web/radar/us_radar_large_usen.jpg", @TempDir & "\doppler.jpg", 1, 0) Else InetGet ("http://image.weather.com/web/radar/" & $sLocalCode & "closeradar_large_usen.jpg", @TempDir & "\doppler.jpg", 1, 0) EndIf EndFunc Func Close () Exit EndFunc [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
azjerry Posted January 11, 2005 Share Posted January 11, 2005 I see functions like GUICreate and InetGet that generate an error when I try to run the script. Where do they come from? Link to comment Share on other sites More sharing options...
Josbe Posted January 11, 2005 Share Posted January 11, 2005 I see functions like GUICreate and InetGet that generate an error when I try to run the script. Where do they come from?<{POST_SNAPBACK}>Maybe you need: v3.0.103 - Beta version for run it. • AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
Gene Posted January 12, 2005 Share Posted January 12, 2005 I see functions like GUICreate and InetGet that generate an error when I try to run the script. Where do they come from?<{POST_SNAPBACK}>These and many other new functions are in the latest "Beta" versions of the software. [font="Verdana"]Thanks for the response.Gene[/font]Yes, I know the punctuation is not right... Link to comment Share on other sites More sharing options...
b1t5tR3@m Posted January 26, 2005 Share Posted January 26, 2005 I've been intrigued by this whole concept and thought I'd post my .02.Personally, I've changed the linked URL to the smaller bitmap so it wouldn't take up so much screen real estate (http://image.weather.com/web/radar/us_ind_closeradar_medium_usen.jpg); then changed the appropriate script code to reflect that. I like Gene's addition of the edit box for where you live, but think it might be a bit easier to just allow the user to enter his/her abbreviated state....PA, MI, NY....etc, instead of using zip codes. Would cut down on the code entries as well.I also like NASA's Global Hydrology and Climate Center site; you can pick different satellites to view, such as infrared, visible and also North and South America.I Photoshopped an image to reflect the concept if anyone is interested...the basic layout is borrowed from Aaron's Encrypting tool.Weather_station.bmp Link to comment Share on other sites More sharing options...
layer Posted January 26, 2005 Author Share Posted January 26, 2005 did you change the GUI color (not bk but like the border)? or is that just photo shop? i didnt know we could chnage color of border? FootbaG Link to comment Share on other sites More sharing options...
zcoacoaz Posted January 27, 2005 Share Posted January 27, 2005 make a drop down list of where you want to see, i had to change it to show my state (quite easy but u know) [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
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