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 1 made on Thursday August 26, 2010 at 05:45
miwi
Long Time Member
Joined:
Posts:
December 2004
34
Hello experts,

I try to have a simple toggle script for Play and Pause action on the same button.

Means my Bluray player has Pause and Play separated and there is no Play/Pause toggle IR code.

Therefor I want to put both IR codes on the same button and use it as ping/pong.

When entering the page I would like to have the related button showing the "Pause" symbol. As soon as I execute this button it should send the Pause IR code and then switch this button to "Play" including changing the symbol.
If I then execute this new play button it should execute the Play IR code and switch then back to the initial pause function.

The code I used / found related to that is made power tracking which I do not need as I do not need to track actual status.



Code is:

var pwrOn = System.getGlobal("PSG_PWRON");
if ( pwrOn == null ) { pwrOn = "On"; }
if ( pwrOn == "On" ) {
CF.widget("Play", "HIDE", "DVDBEAMER").executeActions();
pwrOn = "Off";
} else {
CF.widget("Pause", "HIDE", "DVDBEAMER").executeActions();
pwrOn = "On";
};
System.setGlobal("PSG_PWRON", pwrOn);



Thanks for helping me and sorry for asking such simple things...


miwi
Miwi


Hosting Services by ipHouse