|
|
|
Philips Pronto Professional Forum - View Post
|
|
|
|
|
|
|
The following page was printed from RemoteCentral.com:
Pronto Scripting and Jump
| |
|
Topic: | Pronto Scripting and Jump This thread has 4 replies. Displaying all posts. |
|
Post 1 made on Wednesday October 1, 2008 at 22:13 |
RomstadtJ Long Time Member |
|
|
Am I missing something or is there no way to execute a jump say to Home via script?
|
|
Post 2 made on Wednesday October 1, 2008 at 23:56 |
Lyndel McGee RC Moderator |
Joined: Posts: | August 2001 13,006 |
|
|
I guess you have not searched on this topic. Shame on you. :)
Put a jump in a button and then tag the button. Then use widget.executeActions() against the button. Be aware that you WILL get an exception thrown "ActionList Error" which you can hide via try/catch.
Please do a quick search for "ActionList Error" for more information.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
Post 3 made on Thursday October 2, 2008 at 00:23 |
pnw Long Time Member |
Joined: Posts: | September 2008 17 |
|
|
There is a roundabout way to do this by creating a button with an Action of jumping to Home, and then invoking the button's action through ProntoScript.
Create a button with the desired actions, and be sure to assign ProntoScript names for the button, page, and activity. It can then be called from anywhere, as long as the activity is referenced, using exmple ProntoScript like this:
CF.widget("MY_BUTTON","MY_PAGE","MY_ACTIVITY").executeActions();
I'm using this technique with PEPv2 to jump back to Home after turning off my system via ProntoScript. I use a separate activity with a hidden page just to hold buttons with actions like this.
Other similar examples are here on the forum, as well as in the developer's guide, just search for "executeActions".
|
|
OP | Post 4 made on Thursday October 2, 2008 at 05:31 |
RomstadtJ Long Time Member |
|
|
I am sorry, but I still think I am missing something. Why should we have to expend resources, to execute a jump or to send an IR command, when Phillips could give us commands via the scripts. I know Lyndel McGee said that he talked to Phillips and they said that there would be all kind of problems with this. Just seems there has to be a better way.
Is the a way to dynamically change IR Codes or Jump Action. Yes… other that having hidden buttons. Maybe approach this from the other direction, give us some script commands that would run in an action list or be to export an action list to a compiled script text or something.
|
|
Post 5 made on Thursday October 2, 2008 at 10:50 |
Lyndel McGee RC Moderator |
Joined: Posts: | August 2001 13,006 |
|
|
Unfortunately, there is NO way to dynamically change an ActionList, text color, or Font size of a widget. Maybe there is a better way. But IMO, the effort you spend whining about it now is wasted as there is a way that works, and works well. Even if you had a way via script to do jumps, you'd still have to use Activity.scheduleAfter() to execute code in Page Script that would contain a jump. (See the Philips ProntoScript FAQ where this item/approach has been noted).
My suggestion! Just move on, do the work and go from there. There are MORE important fish to fry here. For example, being able to see the Properties dialog in PEPv2 when panel is zoomed is, IMO, 1,000,000 times more important than focusing on one aspect of ProntoScript that can be rather easily handled with a simple function.
function executeJump(widget) { Activity.scheduleAfter(5,function(w){ try { if (w) w.executeActions(); } catch(e) { // you may have to tweak text on the error message below. Please test!!! if (String(e) !== 'ActionList Error') throw e; } },widget); }
And, in case anyone is wondering. No, I DO NOT work for Philips, and NO, I am not an professional installer. I am a Software Engineer who happens to have a very indepth knowledge of Javascript as well as the API that Philips used to build ProntoScript into the Pro line of controllers. I don't do Pronto full-time. It is a hobby that hopefully one day will turn into a business.
|
Lyndel McGee Philips Pronto Addict/Beta Tester
|
|
|
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.
|
|
|
|