Sign in to follow this  
Followers 0
cppman

Temperature, Wind Speed, and Humidity.

16 posts in this topic




Ha! Finnaly, i made a little weather thing... Basically it just strips the temp, hum, and wind speeds from a line of the weather.com code for the current city...

It returns the Current Temperature, Wind Speeds, and Humidity level of the zip code you provided.

well, here's the code. its really basic, but pretty cool.

;Line 29
#include <array.au3>
#include <file.au3>
$Code = InputBox("Weather", "Enter your Zip Code: ")
$File = _TempFile()
INetGet("http://www.weather.com/weather/local/" & $Code, $File, -1, 0)
$Line = FileReadLine($File, 29)
$LineA = StringSplit($Line, "")
$Title = FileReadLine($File, 18)
;Get city and state name, 34 from left, 22 from the right
$CityNameA = StringTrimLeft($Title, 34)
$CityName = StringTrimRight($CityNameA, 22)

Display()
Func Display()
$Cur_Temperature = $LineA[38] & $LineA[39] & "Degrees Farenheit"; Temperature 38, 39
$Cur_Hum = $LineA[52] & $LineA[53] & "%";Humidity 52, 53
$Cur_Wind = $LineA[67] & $LineA[68] & "MPH";Wind
MsgBox(0, $CityName, "Temperature: " & $Cur_Temperature & @CRLF & "Humidity: " & $Cur_Hum & @CRLF & "Wind: " & $Cur_Wind)
EndFunc
I get error at line 16

array out of range


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

It needs to be a 5-digit, United States ZIP CODE.

Share this post


Link to post
Share on other sites

It needs to be a 5-digit, United States ZIP CODE.

i u

sed 60433


[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

hmm, kinda weird. maybe that zip code is not on the weather.com website. sry? it works with most other zip codes... 85223

Share this post


Link to post
Share on other sites

hmm, kinda weird. maybe that zip code is not on the weather.com website. sry? it works with most other zip codes... 85223

how did u get vista and what do u think of it

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Its not vista, just a theme that is almost exactly like vista. I love it! Its awesome, but during the installation of the theme, it like completely redoes the entire computer... replaces shell32.dll with their own. also, my computer runs much faster then it did before...

Edited by CHRIS95219

Share this post


Link to post
Share on other sites

Its not vista, just a theme that is almost exactly like vista. I love it! Its awesome, but during the installation of the theme, it like completely redoes the entire computer... replaces shell32.dll with their own.

what is it, where can i get it, it looks great

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

worked for me... mostly

small suggestion

change this

$Cur_Temperature = $LineA[38] & $LineA[39] & "Degrees Farenheit"; Temperature 38, 39

to this ( just add a space before "Degrees" )

$Cur_Temperature = $LineA[38] & $LineA[39] & " Degrees Farenheit"; Temperature 38, 39

my wind showed as

9&MPH

???

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

yeah... it is just 9MPH. the & is in their cuz, i had it add both characters, $LineA[38] & $LineA[39] and $LineA[39] happened to be a '&' sign. It will do that with any of them unless $LineA[39] is a number.

Edited by CHRIS95219

Share this post


Link to post
Share on other sites

[center]AutoIT + Finger Print Reader/Scanner = COOL STUFF -> Check Out Topic![/center][center][font=Arial Black]Check out ConsultingJoe.com[/font][/center][center]My Scripts~~~~~~~~~~~~~~Web Protocol Managing - Simple WiFi Scanner - AutoTunes - Remote PC Control V2 - Audio SpectrascopePie Chart UDF - At&t's TTS - Custom Progress Bar - Windows Media Player Embed[/center]

Share this post


Link to post
Share on other sites

Nice script... it works for me , here in TX.. =D thanks for the post.

Off topic: One more thing about the xp mod pack is it stable to use? caz i check out the forum and many ppl have problem with their pc after the vista mod..

-JohnWang

Share this post


Link to post
Share on other sites

im not sure... i have'nt uninstalled it, my friend says it is... but i honestly dont think it is...

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  
Followers 0