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 Saturday December 31, 2011 at 08:44
Stealth
Long Time Member
Joined:
Posts:
December 2003
56
On December 30, 2011 at 17:53, Lyndel McGee said...
You cannot change actions/actionlists for buttons via script.

If you need 2 different action lists to execute depending on state, I recommend that you create 2 buttons with same ProntoScript Name on 2 separate hidden pages and then use executeActions() or scheduleActions() against the correct widget/button.

In the onscreen button (the one you'd press for Key A on your keyboard), do something like the following.

if (keyboardState == 0) // unshifted
CF.widget("KeyA", "Unshifted").scheduleActions();
else if (keyboardState == 1) // shifted
CF.widget("KeyA", "Shifted").scheduleActions();

In the action of your shift key, you'd simply set the appropriate keyboard state. Note that keyboardState is a variable you declare in you activity or in the page script of the page where the GUI keyboard is contained.

Also note that the "Unshifted" and "Shifted" strings above are the ProntoScript names that you assign to the hidden pages where you have your keyboard buttons that contain the actions you want to execute for each state.

Hi Lyndel,

Again, thank you for your help and patients itís much appreciated.....

I still havenít received my "The Definitive Guide" book yet, so I'm still not 100% on the code. However I think I have the gist of what you are saying.

Forgive me if I am wrong, but will this work with the Overlay I'm using? I can see it working on a page ok but I would prefer to use an Overlay as I like the Overlay experience.

Your idea of duplicating the keyboard sounds good. Would it be possible to do this and stack one key on top of the other on the same Overlay and when the Overlay is called to enter, set some code to hide one/two of the set of keys i.e.

LC could be for Lowercase key
UC could be for Uppercase key
NM could be for Number key

If I have completely misunderstood let me know and I will have to wait until my book arrives.

Cheers

Steve



Hosting Services by ipHouse