yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Apps and Games] Nagual:
hi,

i use htc home as as source while user is in F. and i also use HTC script... and if i show userweather in the S2U2 than i have temperature in F.

i wanted to translate F to C while in the REG are the F numbers saved i wrote

#Fahrenheit to Clesisus 100/(212-32) * (this.value - 32 )

mytemp = 100/(212-32) * ( temp - 32 )

weather="C|"&code&"|"&mytemp&"º H"&hitemp&"º\L"&lotemp&"º"

but i get no value... can some one tell me where is the mistake

and second question

are somewhere texts to the HTC Weather while there are only numbers so i can also have something like

HHT["00"]="Rain/Lightning"

S2Utext=HHT[%codeHTC%]

RegWriteString("HKCU", "\Software\A_C\S2U2\", "S2Utext", S2Utext)
[Windows Mobile Apps and Games] superflysocal:
if you want to update every 10 minutes, delayhours should be like .16667 not .5, which would be 30 minutes

It might be that you haven't given it time to update yet.

What is the value in your registry for:

HKCU\Software\A_C\S2u2\wallpaper
[Windows Mobile Apps and Games] superflysocal:
looks like it should work, but depends on where in the script you put the mytemp.

What is the registry value of:

hkcu\software\a_c\s2u2\userweather

As for the second request, I guess you would have to do that for all weather conditions and you could use what Holman published. If I have time I could do something like that but that's a lot of typing out. Whay not just use the Yahoo script? It could do what you want and autoupdate (which HTC couldn't).
[Windows Mobile Apps and Games] superflysocal:
wait, why do you have # in front of the mytemp and weather section?

you need to remove those

change:

# mytemp = 100/(212-32) * ( temp - 32 )

# weather="C|"&code&"|"&mytemp&"º H"&hitemp&"º\L"&lotemp&"º"

to

mytemp = 100/(212-32) * ( temp - 32 )

weather="C|"&code&"|"&mytemp&"º H"&hitemp&"º\L"&lotemp&"º"

also, you somehow messed this part up:

temp = RegRead("HKLM","SoftwareHTCHTCHomeWeather", "CurrentTemp")

ccodeHTC = RegRead("HKLM","SoftwareHTCHTCHomeWeather", "Icon")

hitemp = RegRead("HKLM","SoftwareHTCHTCHomeWeatherForecast0", "HighTemp")

lotemp = RegRead("HKLM","SoftwareHTCHTCHomeWeatherForecast0", "LowTemp")

codeHTC = RegRead("HKLM","SoftwareHTCHTCHomeWeatherForecast0", "Icon")

should be:

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")

those are the obvious errors. There may be more. maybe you should start from scratch.

None of your "\" is showing up, maybe it is how you cut and paste. Look at your code again.

Edit: here's more missing "\"

curweather = RegRead("HKCU", "SoftwareA_CS2U2", "UserWeather")

currlweather = RegRead("HKCU", "Softwareemerym", "Weather")

curpic= RegRead("HKCU", "SoftwareA_CS2U2", "wallpaper")

curforecast = SubStr(curpic,-6,2)

oldupdatetime = SubStr(curweather,-5,5)

weather = ""

rlweather = ""

Like I said, maybe you should start from scratch.
[Windows Mobile Apps and Games] holmanm:
And don't forget to comment out the line

weather="C|"&code&"|"&temp&"º H"&hitemp&"ºL"&lotemp&"º"

further down the code or it will undo the line

weather="C|"&code&"|"&mytemp&"º H"&hitemp&"ºL"&lotemp&"º"

you uncomented earlier in the code.
[Windows Mobile Apps and Games] Nagual:
i cometed it out while it was not working... it was only shown where in the script it was standing sorry backslash \ is not showing while is in php-code tag

standing :)

i tested it one more time it shows like 0º H73º\L57º
[Windows Mobile Apps and Games] superflysocal:
maybe do a straight copy and paste so we can see your exact code.

also, check in the HTC registries and see if the data listed is correct.
[Windows Mobile Apps and Games] ragedog:
first off, let me say that i love this app. my only problem is I am no long having my appointments show up on the S2U2 screen. weather wallpaper and Sunny shows up fine on the slide to unlock line.

checking the S2U2 setting I have Show Appointments on and in the registry showappointments is set to 1 as well. I cant wrap my brain on why they arnt showing up with this script.

I only changed the first few lines of the script to get it working with weatherpanel. nothing major. deleting and reinstalling the script does nothing.

any ideas?
[Windows Mobile Apps and Games] superflysocal:
are you sure appt is showing up fine if you do not run the script? This should in no way interfere with appts in s2u2. What version of s2u2 are you using?
[Windows Mobile Apps and Games] No1ustad:
HKCU\Software\A_C\S2u2\wallpaper:

\storage card\My Pictures

I don't mind it updating every 30 min, so i'll change the s2u2 setting to 30 min.
[Windows Mobile Apps and Games] firiel:
Usually I don't post just to congratulate but ....

MATE U ROCK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

its just perfect.

Can U consider to support spb weather as well
[Windows Mobile Apps and Games] Nagual:
hi there...

well if i do not do the mats for ages.. :)

well i have done the other way of translating f to c

Ftemp - 32

than the value you devide by 9 and than multiply by 5...it can happen' that by rounding you have 1 degree deference but not the issue...

...

100/(212-32) * ( temp - 32 ) is ****ing wrong

while in mats * goes before /

so actualy lets say the temp is 75 F by this

it is like 100/ 7740 and it is 0,0...something so it was right...

the correct way as we learnd in te schoool schould be

(100/(212-32)) * (temp - 32) ... :)

by thanks for helping me to think :)
[Windows Mobile Apps and Games] ragedog:
I was using 1.05. I uninstalled S2U2 and the script and soft reset the phone. Mort script errored out saying it could not find a destination or something. (obviously because i had uninstalled it.) I reinstalled the newest S2U2 v1.18, but it kept all my previous settings from before. The appointments still will not show up.

my next step is to uninstall mortscript and see if i can hault the script from loading, and retrace my step if that doesnt work would be taking out Mobile Shell 2.1 *groans* ;)

EDIT:Nevermind, i was getting confused on when appointments were displayed. All is well
[Windows Mobile Apps and Games] holmanm:
I did some testing and found out the problem, mortscript calculates 100/(212-32) to be 0, so anything times 0 is 0.

Assuming your formula is correct (I'm American so I know nothing about Celsius). The following seems to work.

mytemp=Format((temp-32)/1.8,0)

32 returns 0

212 returns 100

so it appears to be fine.
[Windows Mobile Apps and Games] Nagual:
yep i forgot "(" as i said on post 346 1.8 ist the same as 9/5

Greetings to states..have not been there since 2001
[Windows Mobile Apps and Games] kaneelias:
Multiple Cities

Hi all, just stumbled upon this wonderful thread, i was originally thinking of editing each icon so it would display underneath my clock but then was pointed here, never occured to me to change the backgrounds, anyway to my point.

A few month ago alanlsmith created a fantastic script which pulls the forecast from 2 cities and displays each city based on the time, eg city 1 = 9am-5pm and city 2 = 5pm to 9pm.

I have attached this wonderful script and wonder if someone can modify my script so the wallpaper changing based on the forecast is built in to it.

Thanks in advance for any assistance
[Windows Mobile Apps and Games] superflysocal:
Just any of my script, for example the WP script, and find this line near the top:

location="USTX0617"

and replace it with these:

#City_1

#first city 7:00 to 18:00

city1 = "ASXX0075"

#City_2

#second city 18:00 to 7:00

city2 = "ASXX0040"

#

#

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

If ( hour >7 AND hour < 18 )

location = city1

else

location = city2

EndIf

#

Then follow instructions on the first post on setting the rest of the options. It is easier for me to start with my script and modify then to look at your script and modify.

Good luck.
[Windows Mobile Apps and Games] superflysocal:
don't know why that registry value is like that, it shouldn't be. should be something like \storage card\My Pictures\xx.gif where xx is the forecast code for the correct icon or wallpaper.

instead of clicking on the script, try putting it in \windows\startup and then soft reset

change delyhours to .1 for testing purpose so it updates every 6 minutes.
[Windows Mobile Apps and Games] kaneelias:
Can you check if this script looks correct? and as i am using weatherpanel do i need the yahoo line in there about location?
[Windows Mobile Apps and Games] superflysocal:
it is easier for me if you just copy and paste your script using php (the far right icon when you are replying)

it will come out like this.

and if you are using my WP script, don't delete anything, if it's there it is needed.

why don't you just follow the instructions and then run it. If it doesn't work, then tell us what is not working. It beats analyzing every line of code to "see if this works"
[Windows Mobile Apps and Games] del4:
Autoupdate your script's location field

For awhile now, I've been wanting to find a way to automatically fill in the location field in this script so that when I travel, S2U2 reflects the actual weather where I am working without requiring me to manually edit the script each time.

Well, I've been using a free app called GPSToday for awhile now and they recently released an update which includes weather data provided by Yahoo that is based on your current GPS location.

After installation, you'll find that "GPSTodayCache\weather.xml" is the same xml file that the Yahoo version of the WeatherWallpaper script downloads and parses to get the latest weather info. Except, in this case, you don't have to manually enter the location info; this is provided for you automatically. So, using GPSToday's periodic updates feature, you can eliminate the InternetConnection checking code within the WeatherWallpaper script and just redirect the ReadFile() call to the local xml file.

Of course, this requires that you either have on-board GPS or are using a BT GPS...
[Windows Mobile Apps and Games] kaneelias:
ok, sorry about that, i tested it and i cannot get it to display the .gifs i got the jpg's to work and could not get changes to the script to work (ie. the display of the weather were not taking effect), will those changes only occur the next time the script updates.
[Windows Mobile Apps and Games] No1ustad:
works!

had mortscript 4.1 installed, did a fresh install of s2u2 1.18,

copied the wallpapers to \storage card\my pictures

copied the yahoo mortscript file to startup, soft reset and done!

no tinkering with s2u2 settings needed, and all ya gotta do is tell the mortscript you put the files in \storage card\my pictures

if you're having problems, you're probably making it more complicated to setup than it really is.

thanks a lot man! this is really nice work
[Windows Mobile Apps and Games] superflysocal:
please post your script in php (icon on the right when replying).
[Windows Mobile Apps and Games] superflysocal:
not sure why the weather info would disappear in 15 minutes, unless, you are getting data issues and it cannot get feed from yahoo. wait and see if it ever comes back or softreset.

I notice on the script you post slideforecast=0, so that means it will not change the forecast on the slidebar (it will be whatever the last time you had it at).

Also, notice, the wallpaper is based on the current condition, while the little icon on the left hand corner is base on the forecast. Just because the forecast changed doesn't mean the current condition changed, and vice versa.

Lastly, when the nightwallpaper comes out is a product of when Yahoo or WP or whatever you are using to get weather decides it is night. I think most wait until sundown, which can be a while in summertime. It doeesn't have to do with the script.

edit:

you also need to change wallpapertype=".gif" if you want to choose animated wallpaper

and

change wallpaperfolder = "\storage card\my documents\download\wallpaper\weather\"

to the destination of where you keep your wallpapers

I think it would help if you read the instructions on the first page again, and also look at the troubleshooting section.
[Windows Mobile Apps and Games] kaneelias:
hi i have read the faq, the folder location of the wallpapers in my script is correct for where i keep my wallpapers, i have no issue with them displaying, it's just they take ages to change. As an example, last night my weatherpanel and the little icon on my s2u2 screen started displaying the moon icon for mostly cloudy at 7:30pm, i went to bed at 3am last night and the wallpaper was still the sun image for mostly cloudy, i did a reset of my phone and when it restarted it changed the icon, but that was the only time.

Can you tell me on average how many times a day should the icon be changing, i only ask because my userweather icon on S2U2 changes 7 or 8 times a day.

Secondly are there any other settings i need to change in S2U2 eg. auto change wallper etc.
[Windows Mobile Apps and Games] Djay64:
hey

Ok i'm a bit confused...........

i've done everything, but the jpg icons are still showing..... i followed step by step....... i don't know what to do.?????? any advice?
[Windows Mobile Apps and Games] holmanm:
I was having this problem too, so I replaced

res2u2=0
if (WndActive("S2U2") = True)
res2u2=1
EndIf
Run("\Program Files\S2U2\iLock2.exe","-refresh")
if (res2u2=1)
Run("\Program Files\S2U2\s2u2.exe")
EndIf

with

IL2=ProcExists("iLock2.exe")
S2=WndActive("S2U2")
If(IL2=True)
Run("\Program Files\S2U2\ilock2.exe")
EndIf

at the beginning of the code, and

If(S2=True)
While(ProcExists("iLock2.exe"))
Sleep(1000)
EndWhile
Run("\Program Files\S2U2\s2u2.exe")
Else
If(IL2=True)
Run("\Program Files\S2U2\ilock2.exe")
EndIf
EndIf

at the end of the code. This way ilock2.exe is not running while the registry is updated.
[Windows Mobile Apps and Games] Djay64:
grrrr

GRRRRRRR Why won't this thing work........ been trying to do this for 12 hours now.................... :confused:
[Windows Mobile Apps and Games] kaneelias:
thanks for the update of the script, i will try it out,

can i also ask anyway who is competent with mort's script if it is possible to alter the script to do this,

i would like the wallpaper to change when the icon in the bottom left changes at the moment the wallpaper does not match the icon in the left and therefore does not match the current conditions (eg. cloudy, raining etc.) just wondering if this is possible,

thanks for all the support so far.
[Windows Mobile Apps and Games] kaneelias:
hi, can you share which version of the script you are using, i am using the WP0.35 and can not find the parts of the script you refer to to be replaced in my current script.
[Windows Mobile Apps and Games] superflysocal:
as i have stated before, the icon in the bottom left is weather forecast (cannot be changed hard coded into s2u2). Weatherwallpaper changes wallpaper based on current condition, so they may not match all the time.
[Windows Mobile Apps and Games] kaneelias:
Yes i understand that, but i was asking if it was possible to change the wallpaper to match the forecast, i ask this because i would like the weather details to match the wallpaper and that way i can remove the S2U2 weather icon, at the moment the description for weather just above the slider matches the S2U2 weather icon, i just want the background to be consistent, ie change the script to show forecast

You say that the wallpaper will match the current condition, i assume that means what ever is displayed in weatherpanel, the next time the script updates it will show the same?
[Windows Mobile Apps and Games] Andersonlee:
Thank you for your program.

It works for my PDA HTC Touch.

So cool!
[Windows Mobile Apps and Games] holmanm:
Sorry I forget that I changed the code to suit me better.

This is the code at the end of the script that you want to delete and put the 2 sets of code at the beginning and end.

if (ccode ne curforecast)
Run("\Program Files\S2U2\iLock2.exe","-refresh")
if (WndActive("S2U2") = True)
Run("\Program Files\S2U2\s2u2.exe")
endif
else
if (slideforecast ne 0)
if (s2utext ne olds2utext)
Run("\Program Files\S2U2\iLock2.exe","-refresh")
if (WndActive("S2U2") = True)
Run("\Program Files\S2U2\s2u2.exe")
endif
endif
endif
endif
[Windows Mobile Apps and Games] holmanm:
Find the line

wallpaper=wallpaperfolder&ccode&wallpapertype

and replace it with

wallpaper=wallpaperfolder&forecast_code&wallpapertype
[Windows Mobile Apps and Games] Djay64:
Can someone put up their entire code which works for them?????? and list all their software used to make this work.....
[Windows Mobile Apps and Games] holmanm:
Take any of the three codes from the first post, HTC if using HTC Home Weather, WP if using the Weather Panel program or Yah if not using either of the other two.

Then comment out (put a # in front of it) the line

ErrorLevel("off")

to be

#ErrorLevel("off")

Then rerun the script and post what errors you get if any.
[Windows Mobile Apps and Games] Djay64:
here's my script

you have to have yahoo go right?.........i used weather panel 1st and got nothing, so tried yahoo..............
[Windows Mobile Apps and Games] Savok:
Hi all. I used the excellent script found in post #63] to set the software to only update with a pc or wireless connection but on the first update it switches to a blank screen (even after a soft reset).
[Windows Mobile Apps and Games] holmanm:
Here is the problem, I assume you are wanting London which is

location="UKXX0085"

zero zero eight five instead of Oh Oh eight five.

This is the link that was created

http://weather.yahooapis.com/forecastrss?p=UKXXOO85&u=c

This is the link you need

http://weather.yahooapis.com/forecastrss?p=UKXX0085&u=c

if you click on them you will see the Oh Oh says no city found while the zero zero will list London.
[Windows Mobile Apps and Games] Djay64:
hmm

still a blank screen
[Windows Mobile Apps and Games] holmanm:
You have to be able to connect to the Internet for the Yahoo script to work.

You have to have Weather Panel installed and working properly and use the location code (?????) found in

\Program Files\MarsWare\WeatherPanel\data\?????-current

directory for the WP script to work. Weather panel will need to connect to the Internet to update but the WP script won't to match Weather Panel.
[Windows Mobile Apps and Games] superflysocal:
wow this great! that's a lot of code for me to decipher though. Can you just tell me which are the variables which contain high temperature, low temperature, current temperature, and forecast number corresponding to icon?

is it still hitemp, lotemp, temp, and code (is there a ccode for current condition?)?
[Windows Mobile Apps and Games] alanlsmith:
Sorry, the code is a bit messy in places, but the principle is that Weather Panel uses the Forecast file for high & low temperatures, first checking that it's looking at the right day in the file, in the script they are: maxtempf, mintempf in °F & maxtemp, maxtemp in °C, although I'm only displaying maxtemp.

The current data is taken from the Current file for the first whole hour & then uses the Hourly file, so the script checks which one to use, based on the update time, if it's the Current file, it splits the file into lines & then takes the Feels Like Temp feeltempf, feeltemp & the icon code code, the conditions "Sunny" etc is in the script: summary.

If the update time means it has to use the hourly file, then the script again splits the file & goes through it to find the correct hour, then extracts the high temp, low temp& icon code from the appropriate segment, same variables as before.

Because the script parses all the files into lines, any part could be passed into a variable & displayed, if wanted, I've also got a version which will display the weather for one location between say 08:00 & 18:00 & another for the evening & night for people who have a long commute to work.

I'm Always willing to help (if I can) with Mortscript, which I find versatile & very interesting. any more explanation needed, just ask, I'll do my best.

PS: code in the script is for the current weather icon

I've just realised that there is a problem with the high temp from the forecast file, when Weather Panel is updated in the evening, the plugin doesn't show the high temp & my script shows a silly figure as the Weather Panel data file holds -9999 for a number of values so I better have a look at coping with this. I'll be back.
[Windows Mobile Apps and Games] XTREEM|RAGE:
Very nice idea, hope to see all weather wallpapers in the end....can't find much about that though :/
[Windows Mobile Apps and Games] superflysocal:
any way to have just current temp instead of feels like temp?
[Windows Mobile Apps and Games] superflysocal:
if code is current condition then what is today's forecast?
[Windows Mobile Apps and Games] superflysocal:
alanlsmith,

for your weatherpanel script I inserted these lines and it got rid of the maxtemp problems at night.

if (maxtempf eq -9999)

then maxtempf= "--"

endif

now does anybody know where to get data for htc weather?
[Windows Mobile Apps and Games] davehutch:
Would these be OK?

they were originally made by Bob_55 here:

http://forums.sbsh.net/index.php?showtopic=21255

let me know if it lines up ok with the unlock slider etc. because I haven't installed the script or anythng on my device

Dave H
[Windows Mobile Apps and Games] Synned:
How would you use this mortscript?
[Windows Mobile Apps and Games] superflysocal:
mortscript help

how do you extract the forecast code from the userweather registry key

\hkcu\software\a_c\s2u2\userweather

for example, if the registry value is C|30|80|70

how do you extract the 30?

nevermind, figured it out. value= substr(registryvalue,3,2)
[Windows Mobile Apps and Games] superflysocal:
same way you use notiweather. go to the hread which I linked on the first post.
[Windows Mobile Apps and Games] superflysocal:
anyway you can make them fullscreen?
[Windows Mobile Apps and Games] alanlsmith:
What I'll do over the next couple of days (I'm a bit tied up at the moment) is look through the WeatherPanel data files & change the script to pull out things like the forecast icon, current temp, etc & put them into variables so that you can choose what to display / use.

Good solution, the same really needs to be applied to the other temps

if (maxtempf eq -9999)

maxtempf= "--"

maxtemp= "--"

endif

if (mintempf eq -9999)

mintempf= "--"

mintemp= "--"

endif
[Windows Mobile Apps and Games] superflysocal:
updated to v0.2 and complete wallpaper set in first post.
[Windows Mobile Apps and Games] Alkhal:
Awesome work here!! I suggest you use Doreen's wallpaper from Vista Alive, Bliss Alive and Ocean. All of them found here. I believe that is where the Samurize icons originated from..
[Windows Mobile Apps and Games] superflysocal:
Ok. I have made a complete wallpaper set based on Bliss alive. See first post. I would like to use ocean alive also, but it has a side bar that we don't need. If anyone can get doreen to do a clean version of ocean alive without the side bars, please let me know.
[Windows Mobile Apps and Games] davehutch:
Wrong shape, but the thread a couple above this one has some other options you can try
[Windows Mobile Apps and Games] superflysocal:
don't worry, as you can see from the post above yours, I modified the doreen Bliss Alive wallpapers to becomeQVGA wallpapers that have the same effect.
[Windows Mobile Apps and Games] superflysocal:
added instructions now on the first post.
[Windows Mobile Apps and Games] alanlsmith:
Sorry for the delay, here is my contribution, attached is the script to display WeatherPanel data on the S2U2 screen, the wallpaper reflects the current conditions & the icon is the forecast, it shows the day forecast icon between 6AM - 6PM & the night forecast icon between 6PM - 6AM

The Wallpaper for S2U2 needs to be in \Storage Card\Weather_Wallpaper

As before you can choose what data is displayed on the screen as text by changing the line near the end of the script to display1, display2, etc. Fairly full explanation is in the script.