• Welcome to TodayPlus Boards v2.
 

Visible winddirection

Started by Timmy, January 15, 2005, 04:30:40 PM

Previous topic - Next topic

Timmy

Visible winddirection


@ ALL,

In the file 'city.txt' is a line like this:   this.swWindD = "NNE"

Is there a possibility to use this line with var=..  and the if...else statement to import the corresponding pic?


• If the answer is 'yes', can someone give me an example of the right text lines? After making the right text-lines, I plan to make all the corresponding pics, in that case.
• If the answer is 'no', please let me know!


Thanks!
Timmy
Toshiba e750BT, WM 2003, Today Plus 0.11.0, WISbar Adv, Agenda Fusion, Pocket Slides, TomTom

uk_skinner

Timmy:

 At this moment, answer is "no. :oops:

 AFAIK, there is no known TP code can assign wind direction to var.

 But, Wichtel might have some idea..

Wichtel

Quote from: "uk_skinner"
 But, Wichtel might have some idea..

Sorry, no Idea :knownot:
Greetings Wichtel 
 

miwi-media.com | Web & Screendesign

uk_skinner

Timmy:

 I have some progress, but  don't know how far can we go.  I applied my stock quote idea (update skin automatically) to add a code at the end of the skin.  Again a exe ( :oops: ) can do following things.

1) Extract wind direction from city1.txt
2) Calculate wind index. (N=1, S=2, W=3 and E=4, if the wind is NEE, then index = 144).
3) Write a code "storevar,var4=144" at the end of the skin (just above the last code).

In thre skin, you just need add "image,x,y,wd%var4%.png,t", then you can have different wind direction image based on your var4 value.

This exe can be delayed until the update finish.

Here is fun part for you.  We could have up 3 characters (NEE) in wind direction, so ideally we need around 64 different image to represent different wind direction.

I also need to figure out a way to get different codes for different city.

So, how do you think?

Timmy

UK_skinner,
Thanks for giving your thoughts to us!!! I like the way you work with your inventive mind!!!



Quote from: "uk_skinner"I applied my stock quote idea (update skin automatically) to add a code at the end of the skin.  
Is this necesarry? The cit1.txt is already automatically downloaded, though?

Quote from: "uk_skinner"Again a exe ( :oops: ) can do following things.

1) Extract wind direction from city1.txt
2) Calculate wind index. (N=1, S=2, W=3 and E=4, if the wind is NEE, then index = 144).
3) Write a code "storevar,var4=144" at the end of the skin (just above the last code).
Looks good to me. Give it a try!!! And ehhh... I love your 'exes'... The more, the better! They can do things, that aren't possible with TodayPlus!

For my information: this var can be used by TodayPlus?!? How does it come in the skin.txt file?!?


Quote from: "uk_skinner"We could have up 3 characters (NEE) in wind direction, so ideally we need around 64 different image to represent different wind direction.
Whow! If you succeed, I begin with these mass-produced pics...

Quote from: "uk_skinner"
I also need to figure out a way to get different codes for different city.
HHmm... They are in the City1.txt the City2.txt and City3.txt files, aren't they? Or do you have other plans???

Timmy
Toshiba e750BT, WM 2003, Today Plus 0.11.0, WISbar Adv, Agenda Fusion, Pocket Slides, TomTom

uk_skinner

Quote from: "Timmy"Is this necesarry? The cit1.txt is already automatically downloaded, though?

Sorry, I did not make it clear.

I was talking about to "update" the skin not city1.txt.  This is a "risk" idea.  When you are running TP, you have a "fixed"/"Static" skin.  In other words, whenever you update your weather/RSS information or radar image, the TP codes in the skin remained the same.

And we ususally edit the skin on PC/PPC then loaded into PPC manually.

This idea invovled a "automatic" step to create TP codes based on the information from city1.txt.  Since there is no TP code can do that, I have to use a third party exe to do that.  And exe will "automatically" edit the codes in the skin.

Here are the step-by-step how the exe does the job.

1) Open city1.txt and extract wind direction then calculate wind index.
2) Open skin file and edit the specific TP code in the skin. In this case, exe will find "storevar,var4=0" and rewrite into "storevar,var4=1" (1 is the wind index from step 1).
3) Close the skin file.

Once you have the var4 changed whenever your city1.txt updated, then a simple "image,x,y,%avr4%,t" can display the image according to your wind index.

Risk: At this moment, I have tested several times and only the code (storevar,var4=..) was re-written everytime.  However, I would like test more times to make sure, it will not add any other "un-desired" things into skin.

Timmy

UK_skinner,

Thanks for your patient explanation: now I understand what you realy mean. And I must say, that it's amazing!!!

It's the first time I've seen someone changing automaticaly a part of the skin.exe file. It gave us several opportunities to do other things... Don't tell Wichtel, because he shall bomb you with much more unexpected wishes...

       
UK-skinner, you had a wild idea, but I've the feeling it's an idea that shall amaze ALL the real skinners! THANKS!!!

Timmy
Toshiba e750BT, WM 2003, Today Plus 0.11.0, WISbar Adv, Agenda Fusion, Pocket Slides, TomTom

uk_skinner

Timmy:

  Thanks for your compliment.  I am just a kid with some wild dream.. :oops:

  Again, this is just one of temporary solutions while we are waiting srs come back.  Maybe one day, he will show up and say "no need for these small exe, I have put these functions in TP".. :pray:

Timmy

Quote from: "uk_skinner"
Again, this is just one of temporary solutions while we are waiting srs come back.  Maybe one day, he will show up and say "no need for these small exe, I have put these functions in TP".. :pray:
UK_skinner,

I must agree: these are nice thoughts...

Wishfull thinking... Thinking of the mysterious mr. SRS... A man who could make things in one evening, where whe all together need month and years... When will he come back to pick up his wonderfull programm to make it better and better and better...

Timmy
Toshiba e750BT, WM 2003, Today Plus 0.11.0, WISbar Adv, Agenda Fusion, Pocket Slides, TomTom

ZapMe1

ZapMe1

"The most knowledgable person in the world is not the one who possesses the most knowledge, but the one who surrounds themselves with the greatest number of knowledgable people"

uk_skinner

Timmy:

 You have your own skin, right?  If you want to test it, please email me the skin and tell me where you want to the code.  Also I need a var for wind index.  I could look at your skin and to see I can find one.

Timmy

Quote from: "uk_skinner"Timmy:

 You have your own skin, right?  If you want to test it, please email me the skin and tell me where you want to the code.  Also I need a var for wind index.  I could look at your skin and to see I can find one.

Done!

If there's a place you need for the .exe: \Program Files\...
Toshiba e750BT, WM 2003, Today Plus 0.11.0, WISbar Adv, Agenda Fusion, Pocket Slides, TomTom

uk_skinner

Timmy:

 Got it.

1) I need the file pathway of your skin.
2) I assumed you would like to display wind dir image in region,3 right?
3) var31 currently is not used in your skin.  So I will use it for wind index.

Timmy

UK_skinner,

1)   \Program Files\TodayPlus\Skins\...
2)   REGION 3 - PAGE 100
3)   OK

Good Luck!

Thanks!
Timmy

_______________________________
PS
Not all the winddirections are with three characters, it also can be with one, or two. Is that a problem?!?
Toshiba e750BT, WM 2003, Today Plus 0.11.0, WISbar Adv, Agenda Fusion, Pocket Slides, TomTom

uk_skinner