TodayPlus Boards v2

Programming and MOD Forums => Developer's Corner Discussion => Topic started by: uk_skinner on January 22, 2005, 07:16:08 AM

Title: Tp Weather Utility
Post by: uk_skinner on January 22, 2005, 07:16:08 AM
Here is what I have for now.  Thanks for all your idea (Broesel, Timmy and thc).  

Warning:  Please backup your PPC and registry keys since all exe will modify your registry keys.

To able to further use/modify the weather information from the MSN.com, several small exe (actually they are fat) are posted here for skinner to use.  It is my suggestion that you should not try this if you are not very familiar to TodayPlus system.  If they are useful, the skin developer will include them in their package in the future.  And I believe them they will have a better instruction than mine here.  After all, English is not my primary language.

TpExeDelay:  It is an exe that will launch any exe after the weather information is updated in TP.  List all the exe you wish to run in the TpExeDelay.txt and place this text file in \My Documents\.  The exe file can be anywhere (Edit: thc reported that there is a problem when he put it in iPAQ Filestore.  I would suggest put it in /Program File for now until I can identify the problem).  You need add a button code to link it, just like the one for radar.exe in Hammerskin.  Please note: each line of file pathway needs to be ended by a "return" even for the last one.  For example:

\SD Card\TodayPlus\TpRegistryWind.exe<---hit return right after exe
\SD Card\TodayPlus\TpSkyTranslate.exe<---hit return right after exe

Get  TpExeDelay here. (http://todayplus.jhollin1138.com/files/uk_skinner/TpExeDelay.zip)

Edit:  Updated on 23Jan05.  Fix the problem that can not launch exe from iPAQ File Store in hx4700.
-------------------------------------------------------------------------------------

For English users, if you wish to display Wind Direction as in image that was made by Timmy.  You need: TpExeDelay and TpRegistryWindDir.

TpRegistryWindDir.exe:  It will extract the wind direction and convert into wind index and storage it in registry key for each of your city.  For example: \HKEY_CURRENT_USER\Software\SRSSoft\TodayPlus\var\c1windir.  You can then assign the wind index to a var (""calcvar,var19,fromconfig,c1windir") and call different images.

Get  TpRegistryWindDir here. (http://todayplus.jhollin1138.com/files/uk_skinner/TpRegistryWindDir.zip)

Edit@ 09Feb05 10:15AM EST (GMT-5) Support French Word for "W"

-------------------------------------------------------------------------------------

For Non-English users, if you wish:

Translate Sky information from English (Cloudy) to your language (Bewölkt, German).  Then you need: TpExeDelay and TpSkyTranslate.

TpSkyTranslate.exe:  It will extract the "Sky" information and search the match one from Sky.txt and write the translated information in registry key for each of your city.  For example: \HKEY_CURRENT_USER\Software\SRSSoft\TodayPlus\text\c1sky.  To access translated Sky information, just use "text,x,y,%c1sky%,c" in the skin.

Import the Wind Speed and Visibility.  Then you need: TpExeDelay and TpRegistryWind.

TpRegistryWind:  It will extract the number of Wind Speed and Visibility into registry key for each city.  For example: \HKEY_CURRENT_USER\Software\SRSSoft\TodayPlus\var\c1windsd(c1vis).  To access it, just use "calcvar,var19,fromconfig,c1windsd".  You can do a calculation to convert it from mhr to kmhr.

Edit @ 28Jan05 4:15PM EST (GMT-5): Add TpRegistryWindEurope
Edit @ 29Jan05 7:00AM EST (GMT-5): Change "999" as "unlimited" for Vis.

Edit @01Feb05 6:00AM EST (GMT-5):  Add TpRegistryWindEuropeS.exe


TpRegistryWindEurope:  Does everything TpRegistryWind but will write wind speed and visibility in km.  If anything over 990, it will write 990.

Get  TpSkyTranslate and TpRegistryWind here. (http://todayplus.jhollin1138.com/files/uk_skinner/Tp_WPACK_NonEng.zip)

-------------------------------------------------------------------------------------

For French Users, if you wish use French abbreviation for wind direction, such as from "NWW "to "NOO", you need TpExeDelay and TpRegistryWindFr.

TpRegistryWindFr:  It does everything just like TpRegistryWind and also writes the translated Wind Direction French Abbreviation into registry key.  For example: \HKEY_CURRENT_USER\Software\SRSSoft\TodayPlus\text\c1windr.  To access it just use "text,x,y,%c1windr%,c" in the skin.

As request by thc, TpRegistryWindFR_S is a silent one.  It will not give you any notification even there is an error.

I would not say these exe are perfect now, please test them if you are interesting.  Please post the comment/suggestion or bugs here and I will update them if necessary.

Get  TpRegistryWindFr here. (http://todayplus.jhollin1138.com/files/uk_skinner/Tp_WPACK_Fr.zip)
Title: Tp Weather Utility
Post by: Timmy on January 22, 2005, 09:23:59 AM
Uk_skinner,


(http://www.cheesebuerger.net/images/more/bigs/i040.gif) This is real fun!!!  (http://www.cheesebuerger.net/images/more/bigs/i040.gif)

I'm so glad you've found this board some month ago...  

It's nice to work together with you! And your lively thoughts and daring experiments and  .exe's made clear how beautiful the skin-hobby is!

Thanks!

Timmy
Title: Tp Weather Utility
Post by: uk_skinner on January 22, 2005, 09:29:32 AM
I could not do this alone..  Thanks for the help from you and others.  We are quite "isolated" as you can tell from the comments from BrightHand.  Every once a while, the TodayPlus issue will cause a "hot" discussion.

Well, at least for me, just do this for fun...
Title: Tp Weather Utility
Post by: uk_skinner on January 22, 2005, 01:07:06 PM
thc found out that he got an error message when he placed TpExeDelay in iPAQ Filestore.  The problem went away when it was placed in /Program Files.  At this moment, I have no clue why it happened.

Does anyone has problem to run it from the storage device?
Title: Tp Weather Utility
Post by: thc on January 22, 2005, 02:47:43 PM
After several attempts, TpExeDelay seems works only ram, at least on french hx4700.
Title: Tp Weather Utility
Post by: uk_skinner on January 22, 2005, 05:17:06 PM
I confirmed thc's testing results on hx4705..  The TpExeDwlay only will work from RAM at his moment.  I will do some investigation.

Edit:  After further testing on both iPAQ 4355 (WM2003) and hx4705 (WM2003SE, VGA), here were my observation.

1)  All the programs seemed to be fine in iPAQ 4355.  I tested from main memory and storage card (SD).

2)  On hx 4705, put all the utility on SD card and TpExeDelay on memory, all of them worked.  However, it appeared there is an extra "character" before the file pathway of the first called program.  Yet, the program did run without any problem.

Another Microsoft thing???? :knownot:
Title: Tp Weather Utility
Post by: uk_skinner on January 23, 2005, 07:13:48 AM
Ok, this time I should not blame to Micorsoft.  I did a slight modification in the codes.  thc has confirmed the problem has solved.  Please download the updated TpExeDelay.exe one from the first post.
Title: Tp Weather Utility
Post by: Timmy on January 24, 2005, 03:17:01 PM
Uk_skinner,

This evening I'm testing the things posted in this thread. To begin simple, I put  '\My Documents\Radar\Radar.exe' in the TpExeDelay.txt
but clicking on TpExeDelay.exe gives the message:
Process
Not Found


What did I do wrong?

Timmy
Title: Tp Weather Utility
Post by: thc on January 24, 2005, 03:26:26 PM
it's work only when it's associate with a button command to the refresh button under your skin like:

imagebutton,8,112,Aktualisierungsbutton_main.png,t,-1,7,-nohighlight,-1
button,8,100,220,26,-1,0,%apps-7-5
Title: Tp Weather Utility
Post by: uk_skinner on January 24, 2005, 03:36:38 PM
Timmy:

 This is normal, although I think I need to change it.

 If you just tap the TpExeDelay under file explorer, it will give you this message.  This program designed to detect the weather updating process from TP then launch the exe from the TpExeDelay.txt after that process ended.  If your TP is not downloading then it will tell you the "Process is not found" then just quit.

 To make it work, you need to have a new button code triggered when you do the weather downloading.  For instance, in your skin, your update codes is: "imagebutton,72,2,refresh.png,t,0,7,,-1", you just need add "button,72,2,x,y,-1,0,file pathway to TpExeDelay.exe".  

 There is a way to test it without modify the skin, but you have to be "quick".  Go to your TP and trigger a "updateing" then before it ends, quick go to file explorer find the TpExeDelay.exe and tap on it.
Title: Tp Weather Utility
Post by: Timmy on January 24, 2005, 03:41:34 PM
@thc and @uk_skinner,

Thank you both for your answer! I understand how it works and I'll try it the way you both showed me.

Thanks!
Timmy
Title: Tp Weather Utility
Post by: thc on January 24, 2005, 03:49:22 PM
your welcome  :)
Title: Tp Weather Utility
Post by: Timmy on January 25, 2005, 03:14:04 PM
Uk_skinner,

The following lines are working well,\Program Files\Uk_skinner\TpRegistryWindDir.exe
\Program Files\Uk_skinner\TpSkyTranslate.exe
\Program Files\Uk_skinner\TpRegistryWind.exe
\Program Files\Uk_skinner\Radar.exe
\Program Files\Uk_skinner\weerDL.exe
\Program Files\Uk_skinner\EarthViewDL.exe

except the line:  \Program Files\Uk_skinner\TpRegistryWind.exe

I get the following message
Error
Could not open Sky.txt!

Do you know the reason?

Timmy
Title: Tp Weather Utility
Post by: Broesel on January 25, 2005, 03:24:53 PM
Quote from: Timmy
I get the following message
Error
Could not open Sky.txt!

Do you know the reason?

Timmy

Timmy, did you place the sky.txt in the TodayPlus Main directory ?
(Same place, where the forecasttext.txt is)

And if so,  try to set your basebath to Progam files\TodayPlus, because
else the exe cannot find the Sky.txt.

Greetings Broesel
Title: Tp Weather Utility
Post by: thc on January 25, 2005, 03:25:14 PM
have you put Sky.txt into TodayPlus folder?
Title: Tp Weather Utility
Post by: uk_skinner on January 25, 2005, 03:33:08 PM
Timmy:

 Also don't forget make your own sky.txt unless you want translate your sky information into French.  In that case, thc can send his sky.txt... :wink:
Title: Tp Weather Utility
Post by: Broesel on January 25, 2005, 03:57:56 PM
Hey uk_skinner,

you are already the man with the most posts ever in this forum  :D

So there is no need to increase your counter  8)

Broesel  :lol:  :lol:  :lol:
Title: Tp Weather Utility
Post by: thc on January 25, 2005, 03:59:53 PM
uk_skinner said my name three time. i like that!! :lol:  :lol:  :lol:
Title: Tp Weather Utility
Post by: uk_skinner on January 25, 2005, 04:00:44 PM
Having the problem with my fingers......... :oops:
Title: Tp Weather Utility
Post by: Timmy on January 25, 2005, 04:11:59 PM
@Broesel, @thc, @Uk_skinner (3x  :wink: ),

Thank you all for helping me!!! You gave the right instructions:
-->  put the Sky.txt must be in the same directory as forecasttext.txt
and all is OK now. Thanks!!!


Again a question for Uk_skinner: do you also have a version of TpRegistryWindDir.exe, TpSkyTranslate.exe and TpRegistryWind that don't for clicking OK?
My City2.txt sometimes don't have all the information. TpSkyTranslate.exe gives the message "Translation was not found". Do you have a version of this program that don't give messages?

I hope you don't mind that I have so much questions for you, everytime again...

Timmy
Title: Tp Weather Utility
Post by: Timmy on January 25, 2005, 04:16:56 PM
Quote from: uk_skinnerTimmy:

 Also don't forget make your own sky.txt unless you want translate your sky information into French.  In that case, thc can send his sky.txt... :wink:

thc speaks one of the most difficult languages for me... At school I always got bad points for French... That were bad times for me...

But, don't mind thc: you have one of the most beautiful countries in Europe! Year after year we enjoy our hollidays in your really beautiful country! Always good to be there!

Timmy
Title: Tp Weather Utility
Post by: thc on January 25, 2005, 04:21:01 PM
thank's a lot Timmy!  :D
i never goes into netherlands, but i'm sure is a beautiful country too... :wink:
Title: Tp Weather Utility
Post by: Timmy on January 25, 2005, 04:24:39 PM
Quote from: BroeselHey uk_skinner,

you are already the man with the most posts ever in this forum  :D

So there is no need to increase your counter  8)

Broesel  :lol:  :lol:  :lol:

(http://www.cheesebuerger.net/images/more/bigs/e058.gif)    (http://www.cheesebuerger.net/images/more/bigs/e058.gif)     (http://www.cheesebuerger.net/images/more/bigs/e058.gif)  


PS:
Broesel: How far are you with your skin? Do you already have implemented the things you liked?
Title: Tp Weather Utility
Post by: Broesel on January 25, 2005, 05:18:28 PM
Quote from: TimmyPS:
Broesel: How far are you with your skin? Do you already have implemented the things you liked?

Well, I've most things implemented but maybe I'll ask uk_skinner for
something new, when I'm clear, what I would like  :oops:

Broesel
Title: Tp Weather Utility
Post by: Broesel on January 26, 2005, 02:09:07 AM
Quote from: TimmyAgain a question for Uk_skinner: do you also have a version of TpRegistryWindDir.exe, TpSkyTranslate.exe and TpRegistryWind that don't for clicking OK?
My City2.txt sometimes don't have all the information. TpSkyTranslate.exe gives the message "Translation was not found". Do you have a version of this program that don't give messages?

Timmy, if it would not give a message, you could not see, if there are
textes, that cannot be translated. If you do not get any text in the
city2.txt, maybe you can put a line in sky.txt with a blank and then
a translation-text f.ex. "unknown" in your language.

line in sky.txt:
,unknown

Don't know, if it works, give it a try.

Broesel
Title: Tp Weather Utility
Post by: Timmy on January 26, 2005, 03:04:51 AM
Quote from: BroeselTimmy, if it would not give a message, maybe you can put a line in sky.txt with a blank and then a translation-text f.ex. "unknown" in your language.

line in sky.txt:
,unknown

Don't know, if it works, give it a try.

Broesel
Broesel,

Thanks for your Tip! It's working well! Thanks!

Timmy
Title: Tp Weather Utility
Post by: uk_skinner on January 26, 2005, 06:20:38 AM
Timmy:

  I will make a total silent version of each one and upload here by the end of this week.  At beginning, getting the error message or OK window are pretty annoy but it makes sure the exe is doing the work.  After we know they beheave stable, then I can make all the message gone.  But if there is something wrong again, then it will be hard to catch.  I will leave both ones on the forum for user to choose.  :wink:
Title: Tp Weather Utility
Post by: Timmy on January 26, 2005, 08:52:51 AM
Quote from: uk_skinnerTimmy:

  I will make a total silent version of each one and upload here by the end of this week.  At beginning, getting the error message or OK window are pretty annoy but it makes sure the exe is doing the work.  After we know they beheave stable, then I can make all the message gone.  But if there is something wrong again, then it will be hard to catch.  I will leave both ones on the forum for user to choose.  :wink:
Uk_skinner,

It's wise indeed to have two versions of each:
•  one version with noise/information-boxes
•  one version complete silent

Users can choose what they want! Good idea!

Timmy

NB:
Your .exe's are working good now. I haven't met any problems so far, and I've tested them many times now. Nice!!!
Title: Tp Weather Utility
Post by: Timmy on January 26, 2005, 02:42:26 PM
My next step is making the winddirection and poiner in my skin. I succeeded in this:
load,city,%var0%
calcvar,var18,fromconfig,c1windir
image,200,10,%var18%.png,t

But I failed in this:
load,city,%var0%
calcvar,var18,fromconfig,%var0%windir
image,200,10,%var18%.png,t

There are three cities in my skin, so I have to let these lines work. Can someone tell me what I did wrong??

Timmy
Title: Tp Weather Utility
Post by: uk_skinner on January 26, 2005, 02:53:15 PM
Timmy:
Did you miss "c" in the code?

calcvar,var18,fromconfig,%var0%windir
Title: Tp Weather Utility
Post by: Timmy on January 27, 2005, 05:11:41 AM
Quote from: uk_skinnerTimmy:
Did you miss "c" in the code?

calcvar,var18,fromconfig,%var0%windir
Uk_skinner,

I realy don't know what code I'm missing, but I'l tell the things I do know:
•  when I drectly cal c1windir, c2windir abd c3windir then I get the right vars from the TodayPlus regestry. So there's no problem. (see first code)
•  when I call the right windir from c1 for Rotterdam, c2 for Arnhem and c3 for Vlissingen, then I can't get the information of the particular var on my screen. (See second code).

Did I make myself clear this time?

Timmy
Title: Tp Weather Utility
Post by: Broesel on January 27, 2005, 05:23:41 AM
Quote from: Timmy
I realy don't know what code I'm missing

Timmy, the code has to be:

calcvar,var18,fromconfig,c%var0%windir

because the value is c1windir and you only replace the number with the var.

Broesel
Title: Tp Weather Utility
Post by: uk_skinner on January 27, 2005, 05:53:14 AM
Thanks broesel, that was what I meant.

Timmy, sorry I did not make myself clear.

to call c1windir using the var, you indeed need use "c%var0%windir".  So

when var0=1  --> c1windir
when var0=2  --> c2windir

if you missed "c", then you ended up like this:

1windir, 2windir....
Title: Tp Weather Utility
Post by: Timmy on January 27, 2005, 10:46:32 AM
 @Uk_skinner and @Broesel,

Thank you both for your patience!!! I understand these lines now, and everything is working well!

Thanks,
Timmy
Title: Tp Weather Utility
Post by: uk_skinner on January 27, 2005, 03:40:23 PM
I just included the silent version of the exe in the package.  Please go to the first post to redownload them if you wish to have the silent versions.

Warning:

The silent version will not give you any message even you have an error happened.  The exe will quit if any error message happened.  I would suggest you test the original version for a period of time and everything goes well as planned then you can switch to silent one.
Title: TpSkyTranslation
Post by: Timmy on January 28, 2005, 12:27:38 PM
@Uk_skinner,

Your silent versions ("s") are working well! Thanks!!!


@ALL,

In view of the translation of the weather text in the sky.txt (used by uk_skinner's TpSkyTranslate.exe) I've attached a handy forecasttext.doc

The steps:Timmy[/color]
Title: Tp Weather Utility
Post by: uk_skinner on January 29, 2005, 07:09:19 AM
@ 28Jan05:

Add TpRegistryWindEurope in Tp_WPACK_NonEng.  This exe will convert mhr to kmhr just like broesel wished.

@ 29Jan05:

A minor mistake was fixed in TpRegistryWindEurope.  Use 999 as "unlimited" for Vis
Title: Tp Weather Utility
Post by: Broesel on January 29, 2005, 07:48:25 AM
Quote from: uk_skinner@ 28Jan05:

Add TpRegistryWindEurope in Tp_WPACK_NonEng.  This exe will convert mhr to kmhr just like broesel requested.

Well, that was no request, only a wish  :D

Quote@ 29Jan05:

A minor mistake was fixed in TpRegistryWindEurope.  Use 999 as "unlimited" for Vis

o.k. thanks  :)

Broesel
Title: Tp Weather Utility
Post by: Timmy on April 22, 2005, 08:39:28 AM
Uk_skinner,

I need your help for TpRegistryWindDir.exe

This program brings the right icon numbers in the registry. Can you make the program doing:
'Variable' ----> 998 into registry?

For your information: 998.png is the 'variable' picture.

Timmy
Title: Tp Weather Utility
Post by: uk_skinner on April 22, 2005, 08:46:14 AM
Quote from: TimmyUk_skinner,

I need your help for TpRegistryWindDir.exe

This program brings the right icon numbers in the registry. Can you make the program doing:
'Variable' ----> 998 into registry?

For your information: 998.png is the 'variable' picture.

Timmy

Timmy:

It sets like this:

"Calm" : 999
"Variable" 998

Can you rename your "Variable" icon to "998"?  Or I missed something here?

:?:
Title: Tp Weather Utility
Post by: Timmy on April 22, 2005, 08:51:42 AM
Uk_skinner,

c2windir  wasn't brougt to the registry. In my city2.txt the winddirection is called "Variable". But is it wasn't put in the registry as nr. 998 (EDIT: nr. 999), so I thought the program didn't have that possibility at this moment.

What do you think?

Timmy
Title: Tp Weather Utility
Post by: uk_skinner on April 22, 2005, 09:08:30 AM
Quote from: TimmyUk_skinner,

c2windir  wasn't brougt to the registry. In my city2.txt the winddirection is called "Variable". But is it wasn't put in the registry as nr. 998, so I thought the program didn't have that possibility at this moment.

What do you think?

Timmy

Ok, found the problem.  The exe was set to look for "VAR" not "Variable".  Does "VAR" works for you in city.txt?  If it does, then I will change "Variable" to "VAR".
Title: Tp Weather Utility
Post by: Timmy on April 22, 2005, 09:45:28 AM
Quote from: uk_skinner
Quote from: TimmyUk_skinner,

c2windir  wasn't brougt to the registry. In my city2.txt the winddirection is called "Variable". But is it wasn't put in the registry as nr. 998, so I thought the program didn't have that possibility at this moment.

What do you think?

Timmy

Ok, found the problem.  The exe was set to look for "VAR" not "Variable".  Does "VAR" works for you in city.txt?  If it does, then I will change "Variable" to "VAR".

Uk_skinner, it's OK now. "VAR" in my city.txt gives now number 998 in the Registry. So: problem solved! Thank you!

Timmy
Title: Tp Weather Utility
Post by: Groovin on June 26, 2006, 10:49:39 PM
UK_Skinner,

Thanks for this hard work.

I am setting up the TPDelay.exe and it works. However, after the Radar.exe fires and then finally the RSSClnup.exe I recieve a small error box that says.  "Could not start"

I have to admit I don't see anything wrong the weather data is good the radar data is good the RSS cleanup is good. So I am not sure what doesn't work because everthing is updated as it should be.

Any help is appreciated.

EDIT:

Well, I am supposing the silent version will be needed as no one has answered to say it is a problem so I will just assume it isn't and move on. Thanks again for the hardwork on these exe's. :D