|
|
|
Philips Pronto Professional Forum - View Post
|
|
|
|
|
|
|
The following page was printed from RemoteCentral.com:
Topic: | Page jump after onHold This thread has 4 replies. Displaying all posts. |
|
Post 1 made on Tuesday February 10, 2009 at 15:37 |
Aarestrups Long Time Member |
Joined: Posts: | January 2009 37 |
|
|
Hi I went to the ISE in RAI Amsterdam last week and spent some time at the PRONTO booth. I did actually solve a puzzle game, programmed on a TSU9800, and was therefore in scope for winning a TSU9800. I haven’t yet received the unit but maybe I didn’t win!! Well I still have my TSU9400 unit and I love it! Also I attended 2 times 2 hours PRONTO classes. One session was held by Koen Bruyninckx trying to teaching the class some basic scripting. Koen has been a PRONTO developer since the very first Pronto. Koen is an extreme nice fellow, competent in programming and nice to be around.
NOW, I am clearly not a programmer. I have had this TSU9400 unit for some 4 weeks now – used to have a TSU3500 – and until now I have only pursuit to lean programming some volume up/dw via the ROTARY wheel – and I succeed last Friday. So far so good!
I have an issue I wish to ask you about. On the System activity Power bottom, I have this little script:
onHold = function () {
CF.widget("TvOff","TAG").executeActions();
}; onHoldInterval = 1100
That I need more is a page jump to a page in another activity IF the onHold function was activated. Scope is to first turn off my TV, if the System power off bottom is pressed for 1100ms and then, after the TVoff IR is send, jump to a specific page. That is the code I need to achieve that?
|
me, |
|
Post 2 made on Tuesday February 10, 2009 at 18:06 |
GuerillaBuild Long Time Member |
Joined: Posts: | December 2008 79 |
|
|
Hi Aarestrups, the script looks good.... However if you are referencing the hard key power button then your widget declarations don't make sense based on this. You have widget("TvOff","TAG") in your script. If you are trying to reference the hard key power button, it's prontoscript name is "PS_POWER". Also is "TAG" the Prontoscript name of a page or activity?
Give CF.widget("PS_POWER").executeActions(); a try.
|
You can hide almost anything until you have to put the drywall up! |
|
Post 3 made on Tuesday February 10, 2009 at 20:43 |
Spudnic Long Time Member |
Joined: Posts: | January 2009 10 |
|
|
GuerillaBuild, I was thinking the same thing as you initially, but he's attaching the PS to the button on the System activity ... so the references of onHold and onHoldInterval should be properly set for the button they're attached to.
I think you're close ... you've got the right code in the right location. I think what you may be missing is the activity or page reference? It does depend on what "TAG" is, a page or activity. My guess is that you didn't add in a TAG page to the System activity ... so you're missing the activity reference.
CF.widget("widget_ps_name","page_ps_name","activity_ps_name").executeActions();
You probably just need to give your activity a PS name and include that in your script.
|
|
OP | Post 4 made on Wednesday February 11, 2009 at 03:03 |
Aarestrups Long Time Member |
Joined: Posts: | January 2009 37 |
|
|
Hi both, Actually the little scripts works fine as it is, I just want to add some more functionality. Btw. the name TAG is refereeing to a page (pronto script name), but the page is not located in the system activity (I am not allowed to add a new page there) but in an activity named POWER. I will try to use this better syntax below to get it 100% right (I did notice an error in the debug window): CF.widget("widget_ps_name","page_ps_name","activity_ps_name").executeActions();
The thing is that the script does turn off my TV after the hard-key-power-button is hold for 1100ms - that I need more is that the script, after execution of sending the IR, shows a specific page to the user. How do I fit in such a code in the script?
I know that I probably have to program the page jump on a button and do a executeActions to activate it.
|
me, |
|
OP | Post 5 made on Wednesday February 11, 2009 at 12:29 |
Aarestrups Long Time Member |
Joined: Posts: | January 2009 37 |
|
|
Ah! just added the following line! CF.widget("AllOff","TAG","HOMEPAGE").executeActions();
So know the script looks like this:
onHold = function () { CF.widget("TvOff","TAG","HOMEPAGE").executeActions(); \\ send IR CF.widget("AllOff","TAG","HOMEPAGE").executeActions(); \\ jump to text page
}; onHoldInterval = 900
By inserting the "activity_ps_name" - the script works better - thanks Spudnic!
One more thing: The "AllOff" widget makes the pronto jump to a page showing a text to the user. Now, I only want this text screen to be shown some 10sec., and after that the HOME page most be shown. will I have to put in some delay code under "page_ps_name" in the page showing the text. How would that code looks like?
|
me, |
|
|
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.
|
|
|
|