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 10 made on Tuesday October 12, 2021 at 18:44
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Hopefully this will help get you started.

Go here:
https://regex101.com/

Plug in this in for the Regular expression which follows the PDF for receiving ! or # depending on whether the message is a response or an event. Not going to belabor the point here as hovering over the regex on the site above does a great job of explaining what each thing does.

^([!#])(\w+)\((\w+)\)$

Then, put this in for the text

!MVOL(250)

You will get multiple matches which are presented in java/ProntoScript script as an array.

So, to write this in a button in your config, you'd add the following script.
var PATTERN = /^([!#])(\w+)\((\w+)\)$/;
var messageFromEquipment = "!MVOL(250)\r";
var withoutCR= messageFromEquipment.replace("\r","");
var matches = PATTERN.match(withoutCR);
// To debug this in PEP2 going to the ProntoScript console, add.
System.setDebugMask(9);
System.print(matches[0]);
System.print(matches[1]);
System.print(matches[2]);
System.print(matches[3]);
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse