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 9 made on Thursday July 29, 2010 at 10:43
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Miwi,

Yes, the basic logic and syntax of your script is right.

A few minor comments about good practice:

1. If statements based on hardcoded positions are a bit error prone. Rather, I would search for ":" and then substring up to there. So, for example:

EndPos = myTime.indexOf(":")
myHour=myTime.substring(0,EndPos);

2. myHour=myHour-0 is apparently a more efficient way of turning a string into a number than myHour=1*myHour.

Finally, to debug: by using the System.print() command in your script, you can run the script in the simulator and see the values that your variables are taking.


Hosting Services by ipHouse