Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Previous section Next section Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Topic:
Parsing RS232 Data
This thread has 4 replies. Displaying all posts.
Post 1 made on Saturday April 11, 2009 at 15:44
CaptnHowdy
Long Time Member
Joined:
Posts:
April 2003
84
Hey all,

I am making my first attempts at Prontoscript. While I have succesfully played with example files and gotten them to work, and I have come up with working PS for a tuner I am working with, I cannot figure out how to parse data returned from the tuner. I can make a call and get the data, and display it on the Pronto, but it is a long string that I only need parts of (two separate parts) to display what I want. Anyone have any suggestions on a decent tutorial or explanation? The developers guide does not go into detail, so I assume it is a common Javascript feature, which I know little about.

Any help would be appreciated, thanks...

Captn Howdy

Last edited by CaptnHowdy on April 11, 2009 15:53.
Post 2 made on Saturday April 11, 2009 at 15:56
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Yes, you are right: what you are looking for are standard Javascript functions. Relevant functions include indexOf and substring. Search for these in google and you will find lots of tutorials.
Post 3 made on Saturday April 11, 2009 at 17:13
Barry Gordon
Founding Member
Joined:
Posts:
August 2001
2,157
And don't forget regular expressions. Get the Flannagan book as a reference. It is all in there. Search the forum to find more on the book.
Post 4 made on Saturday April 11, 2009 at 17:19
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Again, there are lots of online tutorials about regular expressions. But beware: they are pretty incomprehensible things!
OP | Post 5 made on Saturday April 11, 2009 at 18:01
CaptnHowdy
Long Time Member
Joined:
Posts:
April 2003
84
Thanks you guys. I found enough online about substrings to get the tuner data parsed and displayed the way I wanted. I am quite sure there are far more efficient and elegant ways to do what I did, but for a first attempt I am pretty excited. I will get the Flannagan book for future reference. Made my head hurt, but it was worth it. Thanks for pointing me in the right direction

Captn Howdy


Jump to


Protected Feature Before you can reply to a message...
You must first register for a Remote Central user account - it's fast and free! Or, if you already have an account, please login now.

Please read the following: Unsolicited commercial advertisements are absolutely not permitted on this forum. Other private buy & sell messages should be posted to our Marketplace. For information on how to advertise your service or product click here. Remote Central reserves the right to remove or modify any post that is deemed inappropriate.

Hosting Services by ipHouse