My TV has a power toggle button only and I can't find any discrete codes. If I switch Activities the TV is power toggled and of course I don't want that. I am trying to write a script by using a global variable which keeps the state of my TV.
The script below is working fine when the ACTIVITY_MACROS page is within the current activity but I don't want that. I have a "activity" called Macros where I keep all my macros but I can't find a way to execute buttons on pages outside the current activity.
I am also looking for a way to jump to pages outside the current activity to provide feedback to the user (eg. Please wait, system is being setuped).
Any help will be appreciated
if (System.getGlobal("power_toggle") == "off") { System.setGlobal("power_toggle", "on"); page("ACTIVITY_MACROS").widget("TV_POWER").executeActions();