[Windows Mobile Apps and Games] jellibean75:
helping out

sure no problem...

here is what my notiweather says. i changed a few things like the zipcode and had the weather update to current. I will show what i change in bold and italized. or what it was before.

Now i am going to find something new to learn...i am such a nerd...hey that rhymes!

# fetch weather from Yahoo, Parse, Update registry.

# Run every XX Hours

# Version 2.21 using Notification Queue, System Paths, current cond/temps

# USER SETTINGS, CHANGE AS DESIRED

# how often to try and get the weather

delayHours = 1

# your location http://weather.yahooapis.com/forecastrss?p=28304

location="28304" (my zipcode...)

# desired units for temp, f or c

units="f"

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

currlweather = RegRead"\Software\emerym\", "Weather")

curweather = RegRead("HKCU", "\Software\A_C\S2U2\", "UserWeather")

rlccode = RegRead("HKCU", "\Software\emerym\", "Weatherccode")

rlcode = RegRead("HKCU", "\Software\emerym\", "Weathercode")

rlctemp = RegRead("HKCU", "\Software\emerym\", "WeatherC")

rllast = currlweather & rlccode & rlcode & rlctemp

weather = ""

rlweather = ""

# only bother if cellular radio is on

radio = RegRead("HKLM", "\System\State\Phone", "Cellular System Available")

if (radio > 0)

# try to connect

if (not InternetConnected( "http://www.google.com"))

Sleep(30000)

Connect("The Internet")

Sleep(10000)

endif

# do we have internet?

#if (InternetConnected( "http://www.google.com"))

raw = ReadFile("http://weather.yahooapis.com/forecastrss?p="&location&"&u="&units)

if (Length(raw) < 20)

# something wrong!

Exit

endif

# find current and today forcast

notDone = 0

# get tomorrow's weather if hour past 4pm (>15)

if (hour > 15)

notDone = -1

endif

cond = ""

code = ""

ccond = ""

ccode = ""

temp = ""

lotemp = ""

hitemp = ""

tempat = ""

day = ""

ForEach line in split(raw,"^LF^",1)

#<yweather:condition text="Mostly Cloudy" code="28" temp="39" date="Fri, 21 Dec 2007 7:53 am PST" />

if (notDone < 1)

if (Find(line,"<yweather:condition"))

CallFunction("getValue", ccond, line, "text")

CallFunction("getValue", ccode, line, "code")

CallFunction("getValue", temp, line, "temp")

else

#<yweather:forecast day="Fri" date="21 Dec 2007"low="34" high="55" text="Mostly Sunny" code="34" />

if (Find(line,"<yweather:forecast"))

notDone=notDone+1

CallFunction("getValue", cond, line, "text")

CallFunction("getValue", code, line, "code")

CallFunction("getValue", hitemp, line, "high")

CallFunction("getValue", lotemp, line, "low")

CallFunction("getValue", day, line, "day")

endif

endif

endif

EndForEach

if (notDone ne 1)

weather="C|0|Data|Error"

rlweather="Data Error"

else

weather="C|"&ccode&"|"&hitemp&"|"&temp (changed from ="W|"&code&"|"&hitemp&"|"&lotemp

rlweather=day&": " & cond & " "&hitemp & " / " & lotemp

endif

else

# we must be in a black hole

weather="C|0|No|Network" (had a W, changed it to a C)

rlweather="No Network"

endif

if (curweather ne weather)

#for s2u2 UserWeather

RegWriteDWord("HKCU", "\Software\A_C\S2U2\", "ShowWeather",5) (this i added also.. it think this where i keep missing up)	RegWriteString("HKCU", "\Software\A_C\S2U2\", "UserWeather", weather)

Run("\Program Files\S2U2\iLock2.exe","-refresh")

endif

rlcurr = rlweather & ccode & code & temp

if (rlcurr ne rllast)

#for rltoday

RegWriteString("HKCU", "\Software\emerym\", "Weather", rlweather)

RegWriteString("HKCU", "\Software\emerym\", "WeatherC", temp)

RegWriteString("HKCU", "\Software\emerym\", "WeatherF", hitemp)

RegWriteString("HKCU", "\Software\emerym\", "Weatherccode", ccode)

RegWriteString("HKCU", "\Software\emerym\", "Weathercode", code)

if (ccode ne rlccode)

fname = "\Program Files\S2U2\gfx\weather\NA.png"

if (ccode <= 47)

fname="\Program Files\S2U2\gfx\weather\" & ccode & ".png"

endif

Copy (fname, "\Windows\default\cur.png", 1)

endif

if (code ne rlcode)

fname = "\Program Files\S2U2\gfx\weather\NA.png"

if (code <= 47)

fname="\Program Files\S2U2\gfx\weather\" & code & ".png"

endif

Copy (fname, "\Windows\default\for.png", 1)

endif

RedrawToday

endif

# subroutine to pull value out of XML

Sub getValue

offset = Find(argv[1],argv[2]) + Length(argv[2])+2

endoff = find(argv[1], """", offset)

return(SubStr(argv[1], offset, endoff-offset)

EndSub