Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 2 made on Friday July 10, 2020 at 13:53
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,996
Would you mind changing the topic of this thread to something more meaningful such as "How do I execute actions via ProntoScript for a widget?".

The activity containing the button must have ProntoScript Name of "amp". The page containing the activity must have prontoscript name of "amp1". And as you have done, the button must have a ProntoScript name of "input3".

You can do System.print(CF.widget("input3","amp1","amp"));

If something other than null is printed, then you have the above setup correct.


Please not that CF.widget() just retrieves a reference to a widget and does not set the label, change colors, or execute actions.

To be able to actually execute the actions in the widget, you must either use .executeActions() or .scheduleActions() methods as defined in the Dev Guide. Hoping you downloaded it and started reading. ;-)

If the Input3 button has a jump in the action list, you will want to do something like this as a jump will cause an exception as part of executeActions that needs to be safely caught and ignored. You can read more about this via a search on ExecuteActions try catch.


try {
CF.widget("input3","amp1","amp").executeActions();
}catch(e){
}

Or simply schedule the actions on the next available event loop.

CF.widget("input3","amp1","amp").scheduleActions();
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse