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:
Help with PS (Elan module, page jump)
This thread has 2 replies. Displaying all posts.
Post 1 made on Tuesday April 21, 2009 at 22:37
metricav
Long Time Member
Joined:
Posts:
July 2007
35
Hi everybody,
I've downloaded Elan module from Phillips site. Then I found out it is S12 module and I have S86 in the system. I've been trying to learn PS (not much success yet) and I was able to figure out what to change inside code to adapt it to S86, plus I changed graphics into 9600 as the module is made for 9400. This module was scripted and placed entirely under Home and I placed everything into Activity.
Everything works nicely...except one thing.
On the Zone and/or Source page when you press "OK" button (Zone page) or one of the Source buttons (Source page) that will execute script and jump back to Home page (Elan Home) which is tagged ELAN_HOME. This jump is what I can't figure out.
In the original code from I can tell this is done with a following line
CF.widget("PS_HOME").executeActions();
So from what I can figure this is referencing to a hard button (Home) which under system properties has action jump to "Home" and holds predefined PS tag PS_HOME and jump happens. So I thought if I try to emulate this by doing the following it would work the same but I can't get it work after trying for a loooong time:
CF.widget("JUMP_MAIN").executeActions();

where I have a button tagged JUMP_MAIN which has a jump to main device page in actions list. This button is placed on the main activity page which is also tagged ELAN_HOME, so I also tried:
CF.widget("ELAN_HOME", "JUMP_MAIN").executeActions();

Neither of these work. I also tried lots of variations of these trying to make sure I'm following the correct syntax and also tried different functions but nothing.
Am I missing something obvious. I'm sure I am but to me it's far from obvious and I'm completely stuck. Hopefully I'm making sense and sorry for such a long intro for something that must be so simple.
So please help if you can.
D
Post 2 made on Tuesday April 21, 2009 at 23:28
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,006
Try CF.widget("JUMP_MAIN", "ELAN_HOME").executeActions().

You may want to have a look at the the Dev Guide's description of CF.widget() (Appendix) to ensure that you get the order of the parameters correct next time.

If the above does not work, use GUI.widget("JUMP_MAIN") assuming that the 'JUMP_MAIN' button is on the same page you are currently viewing.

When you say 'tagged', I'm presuming you mean assignment of the ProntoScript Name and not the onscreen 'Label' of the button or the label of a page as displayed in the Device Tree. If that is not what you mean, then this is indeed likely your problem.
Lyndel McGee
Philips Pronto Addict/Beta Tester
OP | Post 3 made on Wednesday April 22, 2009 at 15:11
metricav
Long Time Member
Joined:
Posts:
July 2007
35
Lyndel first let me thank you for your willingness to help so often.
I actually adopted using "tagged" as a term for PS name from you so that answers that. And believe me I'm going over and over a developers guide but while it's getting more clear in my head I'm still ways away from getting a grasp on it. I didn't get Flanagan's book yet but I got "Java Script: The Good Parts" from library and I think it helped too. The thing is I never learned any programming language but I'm familiar with most of the custom install programming software and understand what is going on inside the JS code on a basic level. For some time I worked with a company that was an AMX dealer so I was able to talk to programmers there and get a basic grasp of what a programming language is doing within our world of integration systems. I think (I hope not fullishly) if I keep digging into I'll get it eventually but I also know that just reading won't get me anywhere unless I start working on it hands on however small these steps may be. But then that would not be possible without people like you who donate their time to answer all these questions. I don't know how you do it to find time with everything else in your day but hats off to you.
Now, the line in that order worked. I could have sworn I tried flipping it every possible way and when you wrote your suggestion I thought well I already tried that but apparently I didn't.
Now here is a funny thing, I can use this line on OK button on Zone page, but if I try to use the same line on any of the source buttons it will not make a jump.
PS console will throw an error for a line earlier:
var sc;

sc="&S86,SRC,"+gznr+",02\x0D";
s.send(sc);
CF.widget("JUMP_MAIN", "ELAN_HOME").executeActions();

this is a complete code from one of the source buttons. PS console will call on
s.send(sc);
as offending line. Now today I stayed home 'cause I caught a cold so I can only try through simulator but I'm thinking this was happening on the original module but it worked once the file was downloaded into remote. If i do this:
's.send(sc);' (either single or double quotes will work)
than jump will happen but did I just prevent this line from executing?

Another interesting thing is that PS console will call the line
CF.widget("JUMP_MAIN", "ELAN_HOME").executeActions();
as error as well in both my version and original script (Zone page) but the jump will happen.?
Anyway this helped a lot.
Thank you Lyndel,
D

PS Recently I was on regional Phillips training and I suggested a JS programming course as addition to other trainings that Phillips offers, either locally or as a webinar. The guy that was heading this training didn't think this would be a feasible option because he thinks it would be too involved to teach people JS from ground up and too complicated to figure out what condensed version could they offer. He said that is why they published a developers guide.
But I still think if there was a hands on programming training that followed developers guide as a template would be a huge jumping platform for people like me. So maybe with your pull over at Phillips you can have a talk with them.


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