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:
Page Jump Help!!!
This thread has 10 replies. Displaying all posts.
Post 1 made on Tuesday October 5, 2010 at 05:59
deric.lts
Long Time Member
Joined:
Posts:
September 2010
24

Page Jump Pronto Script Needed!

Anyone could help with the following requirement?

Requirement
If the user leave the activity page without any activity, pronto should be able to jump from the activity page back to home page after predefined few seconds.

Would appreciate if someone could helps me out on this.

Post 2 made on Tuesday October 5, 2010 at 06:01
BluPhenix
Long Time Member
Joined:
Posts:
December 2008
371
I don't really get it. Activity page without activity? It's like divide by zero.

Please refine.
OP | Post 3 made on Tuesday October 5, 2010 at 06:33
deric.lts
Long Time Member
Joined:
Posts:
September 2010
24
very sorry! it means when the user log into one of the activity page, but he just leave it there without doing anything (e.g. din press any button n etc.) ..
Post 4 made on Tuesday October 5, 2010 at 07:20
BluPhenix
Long Time Member
Joined:
Posts:
December 2008
371
Uh this will be a "long" one.

What you can do:

-declare a variable in the activity:
var anythingTouched = false;

-make a check function:
function checkIfAnythingPressed () {
if (!anythingTouched) {
--> Execute a jump to wherever you want
}
}

- schedule a the check function:
scheduleAfter(5*1000, checkIfAnythingPressed);

- add, to every button's onpress action:
anythingTouched = true;

This way if you don't touch anything (the value remains false), a jump will be performed somewhere else, otherwise it won't be.

Search the forums hot to jump pages from prontoscript.
Post 5 made on Tuesday October 5, 2010 at 08:43
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
I strongly suggest that you modify your requirements, otherwise, you will be doing the following on each and every button you put on a page in said activity.

anythingTouched = true;
this.scheduleActions();

Furthermore, as you are executing ProntoScript on each and every button, you will find that buttons that need to be press and hold may not work quite as smoothly. If you have an IR code that must be transmitted for a specific period of time via a hold, you may find that it does not work the way you'd like.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 6 made on Tuesday October 5, 2010 at 09:41
buzz
Super Member
Joined:
Posts:
May 2003
4,382
deric.lts,

I agree with BluPhenix and Lyndel McGee, this will be messy and I agree with Lyndel McGee, it can be problematic.

While operating the Pronto, I'm not sure that I would like this functionality, but it could have some utility for an adjustment page, such as setting surround modes.

My approach would be much messier, but there would be relatively few side effects. Rather than directly emit IR commands, I would push every button press into a queue and IR commands would be issued from the Queue that is regularly checked and processed. If there was no Queue activity for a period, then jump.

As I say, this is a mess to get going, but once you have the Queue operating, a new world of interaction possibilities will open.
Post 7 made on Tuesday October 5, 2010 at 10:24
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
Programming all user interactions through a queue is the way I do all of my Pronto postscript work and I strongly recommend it. I also do all TCP/UDP work asynchronously thereby ensuring that the user will also find the Pronto responsive and never losing a user touch. Lastly I run all pages in a page repeat loop (100 ms is what I use). For some pages the page loop is as simple as calling a basic function implementing a switch statement to examine the current state and take actions.

The loop allows for a BUSY state while TCPIP is in process, DONE to allow for TCPIP Messagepost processing if not done at socket close, and an IDLE state where such things as the user queue are checked. All sorts of variants can be added to the switch function and there can be several different functions for different pages.

The loop concept turns out to make various animations such as marqueeing a text string or rotating an hour glass symbol to indicate "Busy" simple to implement.
Post 8 made on Tuesday October 5, 2010 at 13:34
Bosteve
Long Time Member
Joined:
Posts:
May 2003
102
I'm not a ProntoScript programmer, so excuse me if I'm way off base, but it occurs to me that the backlight timeout is already controlled by some function that knows if no button has been pressed for a period of time. Is it feasible to tap into that function, or to have the action of dimming the backlight trigger the jump home?
Post 9 made on Tuesday October 5, 2010 at 14:26
BluPhenix
Long Time Member
Joined:
Posts:
December 2008
371
Sure.

Uuse the onSleep method.
Post 10 made on Tuesday October 5, 2010 at 14:55
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Note that onSleep is called from activity scope (javascript 'this' while inside the function will be the current activity object). If you want to do anything with the current page, you must do CF.page() and check to see if the return from this function is non-null. If non-null, you can then access any of the widgets on the page.
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 11 made on Tuesday October 5, 2010 at 20:39
alpha
Long Time Member
Joined:
Posts:
September 2003
258
Set the time it goes to sleep. Record the time it goes to sleep. Then onSleep.
On Wake .If the time is greater then five minutes then Jump to home.
Project Boredom 2 is here. [Link: mediafire.com]
------------------------
Check Version 1 & 2 out in the files section.


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