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 4 made on Tuesday March 19, 2024 at 18:32
mpg7321
Regular Member
Joined:
Posts:
June 2020
112
Thanks, that works, hear is my code but can't seem to get the "if statement" to work properly,

var e = CF.extender[10];
if( e == null )
{
Diagnostics.log("Extender 0 is not defined");
}
else
{
var s = e.serial[0];
if( s == null )
{
Diagnostics.log("Extender 0 is not a serial extender");
}
else
{
s.bitrate = 9600;
s.databits = 8;
s.parity = 0; // None
s.stopbits = 1;
}
}
var status = s.match('MU?\r','\r',1000);
CF.widget("Mute_Status").label = status;
if (status === 'MUOFF')
{
s.send("MUON\r");
}
else
{
s.send("MUOFF\r");
}

The widget displays MUOFF so when I try the "IF Statement" it should execute the s.send("MUON\r"); line, but it is not


Hosting Services by ipHouse