[Windows Mobile Apps and Games] Nagual:
hi

regcode 4 userweather has something like H72º L52º and for the mytemp it was 0 standing by my tests...

for the second i took this text from page 33

00 Rain/Lightning

01 Windy/Rain

02 Same as 01

03 Same as 00

04 Same as 00

05 Cloudy/Snow-Rain Mix

06 Hail

07 Icy/Clouds Rain-Snow

08 Icy/Haze Rain

09 Haze/Rain

10 Icy/Rain

11 Light Rain

12 Moderate Rain

13 Cloudy/Flurries

14 Same as 13

15 Flurries

16 Same as 13

17 Same as 00

18 Same as 00

19 Dust

20 Fog

21 Haze

22 Smoke

23 Windy

24 Same as 23

25 Frigid

26 Mostly Cloudy

27 Mostly Cloudy/Night

28 Mostly Cloudy/Sunny

29 Partly Cloudy/Night

30 Partly Cloudy/Day

31 Clear/Night

32 Clear/Day

33 Hazy/Night

34 Hazy/Day

35 Same as 00

36 Hot!

37 Lightning/Day

38 Lightning

39 Rain/Day

40 Rain

41 Snow

42 Same as 41

43 Windy/Snow

44 Same as 30

45 Rain/Night

46 Snow/Night

47 Thunder Showers/Night

and here is the script

as you can see the mytemp would be after reading HTC home from registry..

i know i was thinking to take the yahoo one..but this one uses GMS to connect to internet or it uses my cable connection to the laptop ? if it goes over laptop than it would not be a big deal...

hmm i have to look one more time...

# fetch weather from htc weather registry
# Run every XX Hours
# Version 2.2 using Notification Queue, System Paths

# USER SETTINGS, CHANGE AS DESIRED

# how often to try and get the weather
delayHours = .5

# folder containing your weather wallpaper
wallpaperfolder = "\Storage Card\My Documents\download\wallpaper\weather\"

# wallpaper type jpg or gif
wallpapertype= ".gif"

# desired units for temp, f or c
units = "c"

GetTime(hour,min,sec,day,month,year)

# set up for next notification
utime = TimeStamp() + (delayHours*60)*60

mort = SystemPath("ScriptExe") & "\MortScript.exe"
script = SystemPath("ScriptPath") & "\" & SystemPath("ScriptName") & SystemPath("ScriptExt")

# kill any lingering notification
RemoveNotifications(mort, script)
# set notify for myself at next time
RunAt( utime, mort, script)

# Quietly ignore all errors
ErrorLevel("off")

# avoid registry writes if no change
curweather = RegRead("HKCU", "\Software\A_C\S2U2\", "UserWeather")
currlweather = RegRead("HKCU", "\Software\emerym\", "Weather")
curpic= RegRead("HKCU", "\Software\A_C\S2U2\", "wallpaper")
curforecast = SubStr(curpic,-6,2)
oldupdatetime = SubStr(curweather,-5,5)
weather = ""
rlweather = ""

FullHour=hour

CurrentTime = Fullhour&":"&min

# Array for the HTC Home Weather to BackGround JPG
HHW["01"]=32
HHW["02"]=30
HHW["03"]=44
HHW["04"]=30
HHW["05"]=30
HHW["06"]=28
HHW["07"]=19
HHW["08"]=20
HHW["11"]=26
HHW["12"]=40
HHW["13"]=39
HHW["14"]=39
HHW["15"]=38
HHW["16"]=37
HHW["17"]=37
HHW["18"]=35
HHW["19"]=13
HHW["20"]=14
HHW["21"]=16
HHW["22"]=15
HHW["23"]=14
HHW["24"]=15
HHW["25"]=15
HHW["26"]=46
HHW["29"]=46
HHW["30"]=36
HHW["31"]=25
HHW["32"]=20
HHW["33"]=31
HHW["34"]=29
HHW["35"]=27
HHW["36"]=27
HHW["37"]=31
HHW["38"]=33
HHW["39"]=45
HHW["40"]=45
HHW["41"]=47
HHW["42"]=47
HHW["43"]=5
HHW["44"]=46

HHT["00"]="Rain/Lightning"
HHT["01"]="Windy/Rain"
HHT["02"]="Windy/Rain"
HHT["03"]="Rain/Lightning"
HHT["04"]="Rain/Lightning"
HHT["05"]="Cloudy/Snow-Rain Mix"
HHT["06"]="Hail"
HHT["07"]="Icy/Clouds Rain-Snow"
HHT["08"]="Icy/Haze Rain"
HHT["09"]="Haze/Rain"
HHT["10"]="Icy/Rain"
HHT["11"]="Light Rain"
HHT["12"]="Moderate Rain"
HHT["13"]="Cloudy/Flurries"
HHT["14"]="Cloudy/Flurries"
HHT["15"]="Flurries"
HHT["16"]="Cloudy/Flurries"
HHT["17"]="Rain/Lightning"
HHT["18"]="Rain/Lightning"
HHT["19"]="Dust"
HHT["20"]="Fog"
HHT["21"]="Haze"
HHT["22"]="Smoke"
HHT["23"]="Windy"
HHT["24"]="Windy"
HHT["25"]="Frigid"
HHT["26"]="Mostly Cloudy"
HHT["27"]="Mostly Cloudy/Night"
HHT["28"]="Mostly Cloudy/Sunny"
HHT["29"]="Partly Cloudy/Night"
HHT["30"]="Partly Cloudy/Day"
HHT["31"]="Clear/Night"
HHT["32"]="Clear/Day"
HHT["33"]="Hazy/Night"
HHT["34"]="Hazy/Day"
HHT["35"]="Rain/Lightning"
HHT["36"]="Hot!"
HHT["37"]="Lightning/Day"
HHT["38"]="Lightning"
HHT["39"]="Rain/Day"
HHT["40"]="Rain"
HHT["41"]="Snow"
HHT["42"]="Snow"
HHT["43"]="Windy/Snow"
HHT["44"]="Partly Cloudy/Day"
HHT["45"]="Rain/Night"
HHT["46"]="Snow/Night"
HHT["47"]="Thunder Showers/Night"

# get data from registry
# HKLM\Software\HTC\HTCHome\Weather\

temp = RegRead("HKLM","\Software\HTC\HTCHome\Weather\", "CurrentTemp")
ccodeHTC = RegRead("HKLM","\Software\HTC\HTCHome\Weather\", "Icon")
hitemp = RegRead("HKLM","\Software\HTC\HTCHome\Weather\Forecast0\", "HighTemp")
lotemp = RegRead("HKLM","\Software\HTC\HTCHome\Weather\Forecast0\", "LowTemp")
codeHTC = RegRead("HKLM","\Software\HTC\HTCHome\Weather\Forecast0\", "Icon")

# Fahrenheit to Clesisus 100/(212-32) * (this.value - 32 ) ?
# mytemp = 100/(212-32) * ( temp - 32 )
# weather="C|"&code&"|"&mytemp&"º H"&hitemp&"º\L"&lotemp&"º"
### why the F*** is not calculating ?????

#convert HTC code to weatherpanel/Yahoo code
ccode = HHW[%ccodeHTC%]
code = HHW[%codeHTC%]

weather="C|"&code&"|"&temp&"º H"&hitemp&"º\L"&lotemp&"º"
S2Utext=HHT[%codeHTC%]

if (curweather ne weather)
#for s2u2 UserWeather
weather="C|"&code&"|"&temp&"º H"&hitemp&"º\L"&lotemp&"º"
RegWriteString("HKCU", "\Software\A_C\S2U2\", "UserWeather", weather)
RegWriteString("HKCU", "\Software\A_C\S2U2\", "S2Utext", S2Utext)
if (ccode ne curforecast)
wallpaper=wallpaperfolder&ccode&wallpapertype
RegWriteString("HKCU", "\Software\A_C\S2U2\", "Wallpaper", wallpaper)
RegWriteString("HKCU", "\Software\A_C\S2U2\", "S2Utext", S2Utext)
Run("\Program Files\S2U2\iLock2.exe","-refresh")
if (WndActive("S2U2") = True)
Run("\Program Files\S2U2\s2u2.exe")
endif
endif
endif