[Windows Mobile Apps and Games] schettj:
Figured I would make a thread for this to keep the S2U2 thread uncluttered

A_C's wonderful S2U2 introduced support for weather forecast display if you used some apps to get weather, or you could use "User" generated weather data in the registry.

I never have good luck with those weather apps, but I am handy with mortscript - the following script works with S2U2 *and* rlToday, giving you the current weather and the forecast for today or tomorrow.

REQUIRED:

SU2U 0.95 or later, installed, with UserWeather enabled in settings

MortScript 4.1 installed

CHANGES:

In V2.1 I've cleaned up the system paths so they are not hard coded

* this should work no matter where you have MortScript installed

In V2 I've updated the script as follows:

* if your cellular radio is OFF, the weather check is skipped - it will try again on the next scheduled time (ie, it works right when you are in flight mode)

* if there is any runtime error at all, the script quietly quits now, and tries again on the next scheduled time

TWEAKS:

Near the top of the script, you must edit the various settings (see below) to get your weather, and to have it update as often as you want.

You can also change some lower-level parts of the script - if you don't want it to switch to tomorrow's weather forcast after 4pm, remove these lines from the script:

# get tomorrow's weather if hour past 4pm (>15)
if (hour > 15)
notDone = -1
endif

If you want to change what is shown on the S2U2 screen, edit this line in the script:

weather="W|"&code&"|"&hitemp&"|"&lotemp

Change the W to an S to get the Spb weather icons

Change code to ccode to show the icon for the current weather, not the forecast for the day

Change lotemp to temp to display the forecast hi temp / current temp

INSTALLING AND RUNNING

Unzip the attached zip file

Copy notiweather.mscr to /Windows/Startup

If you have run a previous version of this script, you can copy clearweather.mscr anywhere onto your device, and run it once - it will ask if it can clear the notifications... tap Yes. Then you can delete the script

Run the notiweather.mscr script by navigating to it in a file browser on your device and double tappping it. It should silently run - if it works you should see some data activity. Run S2U2 and see if you've got some weather.

It is safe to run the script manually to update the weather - it will also update the next run time to be whatever you have it set for in the script.

WEATHER PANEL ICONS

S2U2 has an incomplete set of Weather Panel Icons.

Go to http://www.desktopsidebar.com/forums/index.php?showtopic=2441&pid=30068&mode=threaded&show=&st=&

Link for full stardock set of weather icons is at bottom:

http://www.desktopsidebar.com/forums/index.php?act=Attach&type=post&id=1489

That set includes the missing 33.png, among many others :D - unzip those into your gfx\weather folder overwriting what's there, if you're using UserWeather and don't have a full weather icon set. Seems to make S2U2 much happier - still not sure if/when the weather display is updated, will try and nail down some examples for A_C to test.

TROUBLESHOOTING/INTERNATIONAL

One user reports that the code used to automatically connect to the internet fails on his device. Changing the Connect() call as follows fixed it:

Original line:

Connect("The Internet")

Change to:

Connect("Internet")

Try that if the script complains for the connect call.

Original post: http://xdaforums.com/showpost.php?p=1756216&postcount=337

Attached is a mortscript that uses yahoo's weather rss feed to fetch the weather and put it in the right place,right format for S2U2 "userweather" - so you can have weather even if you don't have a weather app

Unzip notiweather.zip, and then edit notiweather.mscr in a text editor...

You NEED to edit the file before you put it on your pda - at the top are three settings:

# USER SETTINGS, CHANGE AS DESIRED

# how often to try and get the weather
delayHours = 2

# your location (see http://developer.yahoo.com/weather/ on finding your location)
location="95129"

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

Change those as desired, save, and copy the script to /Windows/Startup

You can launch the script manually or soft reset.

The script uses the notification manager to run every delayHours and fetch your weather.

It issues a Connect call to "The Internet" if no network connection is present.

It formats the weather correctly and puts in in two registry locations:

#for s2u2 UserWeather

RegWriteString("HKCU", "\Software\A_C\S2U2\", "UserWeather", weather)

#for rltoday

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

If you are just using S2U2, all you need to do is edit your registry and add ShowWeather, DWORD 5.

If you also use rltoday, you can use that second registry value in your skin.xml to get a string with the current weather + today (or tomorrow if after 4pm's) weather and hi temp

<Registry x="119" y="52"key="key="HKEY_CURRENT_USER\Software\emerym\Weather" alignment="center">
</Registry>

If not, you can just ignore that, or even edit the script and cut out those parts...

It's all working very well. Thanks to A_C for this great app!

Lemme know if anyone runs into any issues.

Change log:

V 2.2: 15-01-2008 - use system paths from Mortscript to set up notifications

V 2.1: 13-01-2008 - skip check if cell radio off, handle errors cleanly

V 2: 22-12-2007 - first working version

V 1: unreleased test version