Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Shared Channels
This thread has 4 replies. Displaying all posts.
Post 1 made on Sunday January 6, 2008 at 06:57
Berenor
Long Time Member
Joined:
Posts:
December 2007
16
Hi everybody,

in the German cable network there are a few channels that are shared by two different stations. For example on one channel "NICK" is broadcasting during the day and at 8 pm it switches to "Das 4." which will switch back at 6 am to "NICK".
On the TV channel page of my 9400, where you can select TV Stations through buttons with channel logos, I now have two buttons, one with the "NICK" logo, one with the "Das 4." logo, but both do of course the same thing: Switch to the channel, where both stations are broadcasting.

I am not a programmer and won't have any chance to get into ProntoScript in the near future, so here is what I want to achieve:

It would be pretty cool to have a button for the channel, that dynamically, depending on time of day, changes the image (channel logo). So the button would during the day show the "NICK" logo and at 8 pm switches to the "Das 4." logo and vice versa at 6 am.

Is something like that possible?

Thanks for any comments

Stefan
Post 2 made on Sunday January 6, 2008 at 14:17
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Yes as long as you are willing to write pronto script. In fact it is actually fairly simple.

The code would run at page startup and perhaps scheduled for every minute while the page is active. The function would be about 4-10 lines of code depending on how you count lines. It would check the time on the remote and change the widgets image depending on time.
OP | Post 3 made on Sunday February 10, 2008 at 12:09
Berenor
Long Time Member
Joined:
Posts:
December 2007
16
Ok, finally I worked my way through the ProntoScript Developers guide and with non to little knowledge in programming about 70% of it are clear to me.

Now I wanted to achieve my above stated goal. I failed already on the first thing to achieve: Reading out the time via getDisplayTime(). May be it is because I am lacking the basic background of JavaScript, but how do you use this method? I tried just to asign it to a variable

var time = getDisplayTime()

which didn't work.

I also tried to use it as a function:

var time = 0;

time.getDisplayTime()

which also didn't work.

Can anybody help me with the correct syntax to retrieve the time from this?

Thanks
Post 4 made on Sunday February 10, 2008 at 14:05
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,006
Try this....

var time = GUI.getDisplayTime();

getDisplayTime is a 'class' method on the GUI class. Therefore, you must prefix with GUI.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 5 made on Monday February 11, 2008 at 13:04
Berenor
Long Time Member
Joined:
Posts:
December 2007
16
First of all: I ordered Flanagans Javascript guide today, so I won't have to ask anymore silly questions, but until it is here... :-)

OK, thanks to Lyndel I now have a variable with the timestring in it, which brings me to my next problem:

When I want to "extract" the hour via parseInt(time) I only get the correct result if the hour is 10 or greater. Otherwise the hour begins with a 0 (01, 02...) and the parseInt() always gives me 0 and not 01, 02...

Any suggestions?


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse