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 6 made on Wednesday March 20, 2024 at 18:57
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
System.print and Diagnostics.log are your friend

Add a widget on your page with ProntoScript name _PS_DEBUG_ (see the dev guide)

System.setDebugMask(9);

for (var i = 0; i < status.length; i++) {
System.print('i:' + i + '=' + status.charCodeAt[i]);
}

What you will see is the the serial match also returns the carriage return at the end of the string (\r).

So status really is 'MUOFF\r' and not 'MUOFF'

That'ts why === does not work and your status.indexOf('MUOFF') > -1 does work.

:-)

Here's what I'd recommend. Download NodeJS as it is a wonderful playground for JavaScript development. It will really help you learn the JavaScript language and the APIs. Also note that the Mozilla website also lets you try out many things directly from a Web Browser.

[Link: developer.mozilla.org]
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse