Jump to content

Recommended Posts

Posted

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

Check out ConsultingJoe.com
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
Posted

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
Check out ConsultingJoe.com
Posted

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

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

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
  • Recently Browsing   0 members

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