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:
Device state problems
This thread has 7 replies. Displaying all posts.
Post 1 made on Tuesday February 10, 2009 at 10:05
Willoque
Lurking Member
Joined:
Posts:
August 2008
5
Hi everyone,
I am new on this forum. A few years ago I bought an old pronto and I liked it a lot. Now I have recently bought a TSU 9400 and this one is even better. The programming went very well and it is working very well with my system but more and more I find the need to let Pronto keep track of the state of several devices.
I tried the few examples I could find on the net but still I am not able to use this in my programs. Is there anyone who can explain this step by step or maybe knows a good online tutorial? I am a programming newbie, I had some lessons in VB-programming about ten years ago but I feel this is a lot different.
Thank you very much for your help.
Post 2 made on Tuesday February 10, 2009 at 10:54
Herb Crane
Long Time Member
Joined:
Posts:
May 2005
104
There is a ProntoScript file in the files section that has this specific example and explanation. It is written for the beginner. Good luck.
Post 3 made on Thursday February 12, 2009 at 18:47
GuerillaBuild
Long Time Member
Joined:
Posts:
December 2008
79
If you've got some VB experience and you have a reasonable understanding of functions and subroutines, you may have the tollerance and experience to survive the developers guide for Prontoscript.

I believe that there is a copy in the files area of this web site as well. The nice part about using the dev guide is that the appendix contains descriptions and definitions for all the methods and properties that are available in Prontoscript (aka javascript).

The only annoying thing you are going to run into is that Prontoscript is a run time language with no compiler. Thus you don't have an integrated development environment (IDE) that will spot typing and syntax errors. If I've captured your interest: Get a free copy of VB.net 2008 (express edition). You can create jscript files and use the intellisense features to help with the syntax checking. Just remember that Prontoscript is a partial implementation of what jscript offers.
You can hide almost anything until you have to put the drywall up!
Post 4 made on Thursday February 12, 2009 at 22:17
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,997
What is wrong with the free tool JSLint or Eclipse with WebTools?
Lyndel McGee
Philips Pronto Addict/Beta Tester
Post 5 made on Friday February 13, 2009 at 10:28
GuerillaBuild
Long Time Member
Joined:
Posts:
December 2008
79
Simply a question of personal preference Lyndel. I've used JSLint and it works well; I do mostly VB.net, C#, C++ & SQL programming thus like using Visual Studio 2008 as an IDE.

FYI: The Visual Studio express editions (incl Visual Basic 2008) are all free as well.
You can hide almost anything until you have to put the drywall up!
Post 6 made on Friday February 13, 2009 at 14:19
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,997
I also use VS2008 in day job but use VS2003 as source editor for Pronto and JSLint as external tool.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 7 made on Friday February 13, 2009 at 14:44
Willoque
Lurking Member
Joined:
Posts:
August 2008
5
Thank you for the replies people. The thing is that I had a basic education on VB but this was about ten years ago. First of all it is a different language and second I forgot a lot of it. I was able to write small and simple programs but when I try the "device state article" that is indeed published on this forum and looks really simple I can't seem to get it to work.
Maybe it is indeed the combination of Prontoscript not having an IDE and the fact that I never used javascript. I will try the programs you mentioned but I feel this is going to be a struggle. Either way I will keep trying to get it to work. Maybe I should be folowing a good JS-course first.
Thank you for the replies.
Post 8 made on Friday February 13, 2009 at 15:16
Guy Palmer
Active Member
Joined:
Posts:
June 2008
648
Here is the code that I use to track the device state of my TV:

if(System.getGlobal("Device_TV")=="on")
{
System.setGlobal("Device_TV","off");
CF.widget("PS_TVOff","PS_TVCodes","PS_Codes").executeActions();
}
else
{
System.setGlobal("Device_TV","on");
CF.widget("PS_TVOn","PS_TVCodes","PS_Codes").executeActions();
}

This code sits on a button which acts as a power toggle. The two lines with executeActions() each link to link hidden buttons which switch the TV (and cable box) off and on respectively. The variable "Device_TV" monitors the device state and has the value 'on' if the TV is on and 'off' if the TV is 'off'.

In case anyone is wondering why I do this, it is because a) my wife likes toggles rather than discretes and b) there is only one hard button for power.


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