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 Tuesday August 25, 2020 at 14:49
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,636
It might help others to use more descriptive subject lines in your posts such as

"GUI.widget() does not always work as expected".

Your post is not explicitly clear about which line(s) are not working.

However, I know SIDVD is a command sent to a Denon/Marantz unit to set the input to DVD so I can likely figure that piece out.

Activity script can run when a page is not yet visible.
GUI.widget() can return null when called from within the Activity script if a page script has not been executed. This frequently happens when entering an Activity for the first time. Only at the time a Page script executes are widgets available for you to tweak. See Sections 7.2 and 7.2.1 of the DEV Guide.

Your script is trying to set the 'visible' property of null will throw an error and all remaining lines will be skipped.

Section A.6.2.7 of the DEV Guide.
GUI.widget - Search for a widget that is currently displayed on the screen. This also includes firm keys and hard keys.

Return
Widget
The class instance corresponding to the found widget,or null if not found.

Either check for this condition and handle it or move the widget setup code into a Page script.

Last edited by Lyndel McGee on August 25, 2020 15:02.
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse