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 remember last action?
This thread has 9 replies. Displaying all posts.
Post 1 made on Sunday April 12, 2009 at 05:45
JonasW.
Lurking Member
Joined:
Posts:
April 2009
5
Hi,

I have the pronto TSU9400
And I've made different buttons for e.g. looking at the TV, that will put on the tv, put the TV in the AV input, set the audio to TV/sat, and put the sat on.
While it's doing that, it's giving a wait screen. afterwards it sends you to the TV page.
But when you want to put a light out you need to leave that page and get back to the home page.
Now when you repress the TV button it reloads all that stuff which is actually not needed.

Now my question is:
Is there anyway the pronto could remember the status it is in (e.g. TV status, radio status,...)
So when you repres the button that's already loaded it doesn't need to reload all it's components.

Thanks in advance

Jonas ;)
Post 2 made on Sunday April 12, 2009 at 11:44
buzz
Super Member
Joined:
Posts:
May 2003
4,383
JonasW.,

This can be done with ProntoScript, however, from the general tone of your post, I'm guessing that this out of your comfort zone.

You can also use the "Browse Backward" special function assigned to a "Return" button on your light switching page. This is very quick and easy. I suggest that you create a separate activity for adjusting lights and limit this activity to a single page. You'll find that this simple scheme is not as much fun if there are multiple pages in the lamp adjust activity. An advantage of this scheme is that a single light adjusting activity can service all of your devices -- requiring the addition of a single jump button to each device. (You should use the same hard button or a characteristic icon or colored button on each device)
Post 3 made on Sunday April 12, 2009 at 13:44
mariomp
Loyal Member
Joined:
Posts:
November 2006
5,681
Why do you need to leave the screen? Is your light command an IR or RF one in which case you could just add that function in between other commands (or at the end of them)?
OP | Post 4 made on Sunday April 12, 2009 at 15:40
JonasW.
Lurking Member
Joined:
Posts:
April 2009
5
On April 12, 2009 at 11:44, buzz said...
JonasW.,

This can be done with ProntoScript, however, from the general tone of your post, I'm guessing that this out of your comfort zone.

You can also use the "Browse Backward" special function assigned to a "Return" button on your light switching page. This is very quick and easy. I suggest that you create a separate activity for adjusting lights and limit this activity to a single page. You'll find that this simple scheme is not as much fun if there are multiple pages in the lamp adjust activity. An advantage of this scheme is that a single light adjusting activity can service all of your devices -- requiring the addition of a single jump button to each device. (You should use the same hard button or a characteristic icon or colored button on each device)

Well I would like to do it with javascript, and I think I'm capable of doing that since I've already made a javascript(prontoscript) for ajusting the volume with the wheel. And I already know some basic programming languages.

Can't I do it like this:


if (radio == 1)
{CF.widget("direct","PAGE","ACTIVITY").executeActions();}
if (radio == 0)
{CF.widget("indirect","PAGE","ACTIVITY").executeActions();
int Radio=1;
int TV=0
int DVD=0
int CD=0}
}

When direct and indirect are buttons on the page "PAGE"
Or something like this?


NOTE: The page back wouldn't work as you first need to return to the home page, then select house, then select lights.
In almost every case you need to do at least 2 actions. Cause there is just too much to control from 1 page

Last edited by JonasW. on April 12, 2009 18:18.
Post 5 made on Sunday April 12, 2009 at 20:08
buzz
Super Member
Joined:
Posts:
May 2003
4,383
JonasW.,

I have used both methods.

The Browse Backward method is much simpler and it works very well if the landing activity (device) requires only one page. If this is true for your lighting adjustments, then all of your devices (TV, DVD, etc.) would include a button to jump directly to the lighting page and a "return" button (Browse Backward) on the lighting page would return to the calling page. There is no need to go through the Home page.

If your lighting control is so complex that it requires multiple pages, then the ProntoScript method is better. Create a hidden button for each page that you might return to. The activity for each of these buttons is Jump to ... target pages. Prior to the jump, using a global variable, keep track of the desired return button and use the global variable in your executeActions().

I usually use a specially colored, uniformly placed buttons for the goto and return functions. In some cases I've used one of the programmable hard buttons. On the lighting page you could redefine the Home key as the return if screen space is tight.
OP | Post 6 made on Monday April 13, 2009 at 03:11
JonasW.
Lurking Member
Joined:
Posts:
April 2009
5
Yeah, There are too much lights to put on one page, so the browse backwards is no option. Is my prontoscript OK? Will it work? I guess I'll just give it a try.

EDIT: That's the code I'm trying to use but it doesn't work :(

if (Radio == 1)
{CF.widget("Go","PAGE","ACTIVITY").executeActions();}
if (Radio == 0)
{int Radio=1;
int TV=0;
int DVD=0;
int CD=0;
CF.widget("Run","PAGE","ACTIVITY").executeActions();}
else
{int Radio=1;
CF.widget("Run","PAGE","ACTIVITY").executeActions();}

Any idea's why it doesn't work?

Jonas ;)

Last edited by JonasW. on April 13, 2009 03:26.
Post 7 made on Monday April 13, 2009 at 14:37
n2hifi
Long Time Member
Joined:
Posts:
August 2007
192
When each page loads you need to store the device and page in a global variable (don't do this on the lighting page of course):

System.setGlobal("cDevice", "Satellite");
System.setGlobal("cPage", "Navigate");

Then you need buttons on a different page that simply jump to those pages. In this example I would have a button called "SatelliteNavigate" on a "activities" page in a device called "macros" that jumps to the "Navigate" page on the "Satellite" device.

Then you need a button on the lighting page that runs:

var lastPage = System.getGlobal("cDevice") + System.getGlobal("cPage");
CF.widget(lastPage, "activities", "macros").executeActions();
Mark Olsen, CTS
Cannon Design
Post 8 made on Monday April 13, 2009 at 20:56
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,001
Note that if you are attempting to execute a widget with page jumps inside the Page Script, you will need to use scheduleAfter() to make this work properly.

See the Philips Prontoscript FAQ for more information or search this forum for scheduleAfter().
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 9 made on Tuesday April 14, 2009 at 07:10
JonasW.
Lurking Member
Joined:
Posts:
April 2009
5
Nhifi, If I understand it good, that's just the same action as pageback.
That just saved the last page.
But I would like to know wich page was the loaded, e.g. the TV page, the DVD page, CD page,... Cause it loads 4pages before you can adjust the light.

Somekind of memory to each page to see if it has been viewed. that memory should be reseted when an other media page is viewed.
I would like to use the same method to know to wich radio station you are listening.
Post 10 made on Tuesday April 14, 2009 at 15:55
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,001
Then, for EVERY page in your configuration that can jump to your common activity (or for a page that determines what action you'd do in common activity), you'd enter some prontoscript.

Set a global for pages you want to track, for example....

System.setGlobal('currentActivity', 'listenToCD');

and for others that you don't care about, consider clearing the global...

System.setGlobal('currentActivity',null);

There is no "magic" way to do this at the page level. If there was, then the variable would be cleared in the 3 pages following your jump to Lighting.

Instead of attacking the problem from the page level, consider using a global named "currentActivity" where values are "listenToCD", "watchTV", etc... These would be set in the activity script vs page script. Activities that do not require special handling would clear the global as I've shown above, and activities that needed the variable would set it.

Last edited by Lyndel McGee on April 14, 2009 16:02.
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