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:
How to change the title display of a Page
This thread has 13 replies. Displaying all posts.
Post 1 made on Tuesday January 8, 2008 at 16:23
Joel Albert
Founding Member
Joined:
Posts:
February 2002
21
All,

I would like to have my 9400 display the actual Page Label that I name the page rather than the Device Label the page belongs to. I tried looking for an example script but couldn't see one. Seems simple enough but I am a newbe to Pronto Script.

To be clear, here is a quick example


Tivo (Device Label)
Tivo - Transport Controls (Page Label)
Tivo - Live (Page Label)
Tivo - Favorites (Page Label)

What I want to do is have the Page Label (i.e. Tivo - Transport Controls) displayed in the Title Bar rather than just the Device Label (i.e. Tivo).

I can't see how to do this without a script and can't figure the script out.

Thanks in advance

Joel
Post 2 made on Tuesday January 8, 2008 at 17:17
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
There are two not so obvious things you need to know.

The widget you are interested in is located on the System page along with all of the other system widgets (Date, time, Wi-Fi, battery, setup, and the one you want the activity label. It is not obvious and to see it you need to click on it (can't see it but you know its general area) or display that page in the editor and use F7 until it is highlighted.

These widgets have no properties and they really should. I have requested that of Philips. For example the WiFi widget should have a property called MAC address, one called IP Address, One Called channel, One called Signal Strength. It should have a method called disconnect which breaks the wifi connectioon with the current WAP and one called connect which finds the best radio siganal and connects to it. The other method they need is dns to allow you to set the IP address of the dns resolver (could be your router which then passes it on) that you want to use eliminating IMHO all the external dns issues. The dns issues seem tp be that some WAP's do not pass the DNS address from the router (if it even has it) to the client and in IMHO it should. All the functionality must exist, they just need to make it architecturally visible and available. Enough soapbox speaking!

To set a value into the albel widget do (in ProntoScript)
CF.activity().label=text string;
To return it to the standard (default) value (the name of the activity):
CF.activity().label=null;

Hope that helps
OP | Post 3 made on Tuesday January 8, 2008 at 17:43
Joel Albert
Founding Member
Joined:
Posts:
February 2002
21
Barry,

Thanks for getting back to me so fast ....

Is there a way I can programatically pick up the Page Label rather than assigning a string? This would allow me to simply adjust the Page Label in the editor and paste a standard pronto script in (versus having to change it for each Page and hardcoding the text).

Thoughts?

Joel
Post 4 made on Tuesday January 8, 2008 at 18:07
Peter Dewildt
Loyal Member
Joined:
Posts:
July 2001
6,307
Why not avoid using ProntoScript at all?

Just put a label on each page with the name of the page. Easier to do, but it takes up a little room.

You could also remove the Activity name from the system page. But, I think it is also used to display information messages such "Connecting" and "Command Failed" when using an Extender.

Which also has me wondering. If you change the label in ProntoScript, does this knock out these information messages?
Peter
Pronto 1000 (retired), Pronto TSU7000, RFX6000 (retired)
Pronto 2xTSU9600, RFX9400
Post 5 made on Tuesday January 8, 2008 at 19:19
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Peter,

If you mean place a widget on each page overlaying that region of the system bar that has the activity label, that would do it. I used to do that before I saw the note in the developers guide on CF.activity().label. It would be nice if the other properties (geometry) were also available. Being a coder at heart I tend to do things in code and using graphics to do what is trivial in code always appeared strange to me.

I suspect as a minimum if you changed the activity label in prontoscript you might alter the extender messages. Not having an extender I can not say.
OP | Post 6 made on Tuesday January 8, 2008 at 19:27
Joel Albert
Founding Member
Joined:
Posts:
February 2002
21
Peter,

I have carefully crafted the layout and don't want to adjust the pages themselves to accomadate a panel for this info. I would much rather use the Activity region of the system bar.

Back to my question though ....

Is there a way I can programatically pick up the Page Label rather than assigning a string? This would allow me to simply adjust the Page Label in the editor and paste a standard pronto script in (versus having to change it for each Page and hardcoding the text).

Thanks

Joel
Post 7 made on Wednesday January 9, 2008 at 00:53
cosmicvoid
Long Time Member
Joined:
Posts:
November 2007
104
On January 8, 2008 at 19:27, Joel Albert said...
Is there a way I can programatically pick up the Page
Label ... simply adjust the Page Label in the editor... versus ... hardcoding the text).

What is the difference between "adjust the label in the editor" and "hardcoding the text"? Seems like two descriptions for the same thing.
Post 8 made on Wednesday January 9, 2008 at 01:08
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
I think I now understand what you want.

In Prontoscript the label of the current page can be retrieved as CF.page().label and the Prontoscript tag can be retrieved as CF.page().tag.
Post 9 made on Wednesday January 9, 2008 at 01:09
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
On January 9, 2008 at 01:08, Barry Gordon said...
In Prontoscript the label of the current page can be retrieved
as CF.page().label and the Prontoscript tag can be retrieved
as CF.page().tag.

I know of no way of doing it in the editor.
OP | Post 10 made on Wednesday January 9, 2008 at 17:47
Joel Albert
Founding Member
Joined:
Posts:
February 2002
21
Peter/Barry,

Okay, so it seems like I could put the following line in the Device Properties.

CF.activity().label=CF.page().label ;

This should change the Activity title to use the label of the page that is being displayed.

Is that correct?

Joel
Post 11 made on Wednesday January 9, 2008 at 18:14
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
You would have to do this code in each Page script rather than in the Activity script.

CF.page() will likely return null if a page is not yet visible (is the case upon first entering an Activity).

If you want to reset the text on the label to its original value, assign Javascript null to the label.

This was done in the Developer's Guide in the example where they animated the Activity Name (AKA CF.activity().label) by supplying a scrolling string.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 12 made on Wednesday January 9, 2008 at 18:15
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
If by device properties you mean the postscript code that will run when the page (page=device) is opened, yes that should do what you want.

But why ask, it is simple enough to try. (;-)
OP | Post 13 made on Thursday January 10, 2008 at 17:12
Joel Albert
Founding Member
Joined:
Posts:
February 2002
21
All,

Figured I owed you a test report ....

Not only tried but succeeded.

I renamed each Page to what I wanted displayed and then added the pronto script onto the Page activity.
CF.activity().label=CF.page().label ;

Works great, and now I have a nice title on the Page that is much more informative than simply the Device name.

Joel
Post 14 made on Thursday January 10, 2008 at 20:51
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Now wasn't that simple?
Lyndel McGee
Philips Pronto Addict/Beta Tester


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