On January 2, 2012 at 05:48, Guy Palmer said...
I'm not clear what you are trying to do but my guess is that your problem is a conceptual one rather than a syntax one. scheduleActions() is a prontoscript command which invokes non-prontoscript actionlists held on buttons. If you want to run some prontoscript (e.g. outputstate=6), you don't use scheduleActions(). Rather, you either just add the script directly on the button being pressed or you put the script into a function held in the activity-level (or page-level) prontoscript and then do a function call from the button.
I’m certainly out of my depth with this…
My goal was to have a keyboard on an Overlay. My problem was how to handle CAPS Shift and Numbers Shift from a button press on the keyboard.
Lyndel’s (appreciated) suggestion was to:-
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 pressed for Key A on the keyboard Overlay), do 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 the shift key, simply set the appropriate keyboard state i.e 0 or 1.
In the buttons of the duplicate pages Unshifted and Shifted I am trying to put some simple code in there just to confirm the Keyboard is switching pages. So I decided to try to change a variable (i.e. OutputState = 6; And for Unshifted OutputState = 10) and read it to confirm. Once this is working correctly my intention is to use both IR commands and TCP Socket commands.
I am very new to Prontoscript and Javascript and maybe I have bitten off more that I can chew at the moment. However if I could get this to work it will be great!.
What to do to correct this, I have no idea. If one of you Prontoscript gods could walk me through it I would be eternally grateful!
Steve