Author Topic: Visible winddirection  (Read 44705 times)

Timmy

  • TodayPlus Veteran
  • *****
  • Posts: 640
Visible winddirection
« on: January 15, 2005, 11:30:40 AM »
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

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Visible winddirection
« Reply #1 on: January 15, 2005, 11:51:13 AM »
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

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 550
Visible winddirection
« Reply #2 on: January 15, 2005, 11:58:10 AM »
Quote from: "uk_skinner"

  But, Wichtel might have some idea..


Sorry, no Idea :knownot:

uk_skinner

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Visible winddirection
« Reply #3 on: January 15, 2005, 10:04:11 PM »
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

  • TodayPlus Veteran
  • *****
  • Posts: 640
Visible winddirection
« Reply #4 on: January 17, 2005, 11:24:43 AM »
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

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Visible winddirection
« Reply #5 on: January 17, 2005, 11:42:27 AM »
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

  • TodayPlus Veteran
  • *****
  • Posts: 640
Visible winddirection
« Reply #6 on: January 17, 2005, 01:43:29 PM »
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

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Visible winddirection
« Reply #7 on: January 17, 2005, 02:00:33 PM »
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

  • TodayPlus Veteran
  • *****
  • Posts: 640
Visible winddirection
« Reply #8 on: January 17, 2005, 02:29:46 PM »
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

  • TodayPlus Veteran
  • *****
  • Posts: 551
Visible winddirection
« Reply #9 on: January 17, 2005, 02:34:15 PM »
We can only Hope and
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

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Visible winddirection
« Reply #10 on: January 17, 2005, 03:40:09 PM »
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

  • TodayPlus Veteran
  • *****
  • Posts: 640
Visible winddirection
« Reply #11 on: January 17, 2005, 03:50:37 PM »
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

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Visible winddirection
« Reply #12 on: January 17, 2005, 03:59:55 PM »
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

  • TodayPlus Veteran
  • *****
  • Posts: 640
Visible winddirection
« Reply #13 on: January 17, 2005, 04:05:58 PM »
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

  • Global Moderator
  • TodayPlus Veteran
  • *****
  • Posts: 1313
Visible winddirection
« Reply #14 on: January 17, 2005, 04:35:19 PM »
Please check your PM...