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:
ProntoScript Guru Needed - Short Press/Long Press Firm Key
This thread has 6 replies. Displaying all posts.
Post 1 made on Wednesday March 27, 2019 at 20:35
MrWinkle
New Member
Joined:
Posts:
March 2019
5
So, I am a complete novice when it comes to prontoscript. I have been doing some reading but finding it extremely confusing.

Hopefully someone can help me out.

I have firm key 3 setup to play recordings\media files on my Humax HDR-2000T PVR (a normal press toggles between Play and Pause which is perfect for me. I understand that it's possible to have 2 different commands on the same firm key depending on the length of the key press. What I would like is for firm key 3 to perform a Stop operation on a long press of the firm key.

Any help would be greatly appreciated.
He's not the messiah
Post 2 made on Friday March 29, 2019 at 20:05
Lowpro
Select Member
Joined:
Posts:
March 2004
2,040
I use the below ProntoScript to accomplish this. A normal button press will invoke one function. An extended button press will invoke another. Works beautifully.

Place the below ProntoScript on your Firm Key...
counter=0; onHold=function(){counter++; if(counter===1){doFirm3Ext();}};
onHoldInterval=1000; onRelease=function(){if(counter===0){doFirm3();}};


At the activity level you'd place your functions...
//CF.widget("Button PS Tag","Page PS Tag","Device PS Tag").executeActions();

function doFirm3Ext() {
CF.widget("Stop","Humax HDR-2000T PVR","Commands").executeActions();
}
function doFirm3() {
CF.widget("Play/Pause","Humax HDR-2000T PVR","Commands").executeActions();
}


I use this "Press & Hold" functionality throughout my configuration file. In fact, I have some activities where nearly every hard button does this. My configuration file is available for download here if you'd like to check out a real world example. Enjoy!

Last edited by Lowpro on March 31, 2019 13:07.
LP Related Links:
View my profile to access various
links to key posts and downloads.
OP | Post 3 made on Sunday March 31, 2019 at 09:04
MrWinkle
New Member
Joined:
Posts:
March 2019
5
Thank you very much for your reply.

I tried it this morning but could not get it to work, I know this is due to my own stupidity and lack of ProntoScript and ProntoEdit knowledge. I think I understand the syntax and what the code is doing but I'm not so sure that I am pasting the code into the correct places.

Decided to have a look at your configuration file to see if I could understand where I was going wrong, goodness me, what a fantastic config! Amazing whats possible, though I have to admit it didn't help as it is so advanced for a novice like me I could not see the wood for the trees.

So here comes the bare-faced cheek...Would it be possible to send you a very stripped out basic version of my xcf for you to drop the code into the correct places for me? Im sure then that I would be able to get a grip on how to do this for other buttons in my configuration. For example I have 2 reusable macros called "Power All On" and "Power All Off" that I would like to short press/long press on the hard Power button.

I hope this would be ok with you.

Regards
He's not the messiah
Post 4 made on Sunday March 31, 2019 at 09:59
Lowpro
Select Member
Joined:
Posts:
March 2004
2,040
Sure. I'll take a look at it for you. View my profile to obtain my email address. Cheers.
LP Related Links:
View my profile to access various
links to key posts and downloads.
OP | Post 5 made on Sunday March 31, 2019 at 10:42
MrWinkle
New Member
Joined:
Posts:
March 2019
5
Thanks

Mail incoming
He's not the messiah
Post 6 made on Sunday March 31, 2019 at 11:57
Lowpro
Select Member
Joined:
Posts:
March 2004
2,040
The ProntoScript I posted a couple replies back was incomplete. Sorry about that. I fixed it. Also, I implemented the "Press & Hold" functionality for Firm3 of your Watch TV activity. See below.

On a normal button press the "Play" command is executed. On an extended button press the "Success" sound is played followed by the execution of the "Stop" command. The "Success" sound in this case lets you know you've held the button down long enough.

"Watch TV/Firm3" ProntoScript:


"Watch TV/Activity" ProntoScript:


With the "Watch TV/Activity" ProntoScript shown above take note of the ProntoScript Names referenced. They should match the ProntoScript Names used (...not the label names) per the given Macro (Action List) you want to execute. Example shown below per the "Play" command.

CF.widget("Play","Humax","PS_MACROS").executeActions();







I should also note that I moved the Humax specific hard button assignments (and labeling) from the System activity to the Watch TV activity in addition to (...just for fun) setting the "System\Power" hard button to take you to your "Home\Power" page.

In any event, the updated XCF can be downloaded here. Feel free to hit me up if you have any more questions and most importantly, have fun!

Last edited by Lowpro on March 31, 2019 13:05.
LP Related Links:
View my profile to access various
links to key posts and downloads.
OP | Post 7 made on Wednesday April 3, 2019 at 12:53
MrWinkle
New Member
Joined:
Posts:
March 2019
5
Excellent, everything working perfectly now along with some other hard buttons doing double duty thanks to the expertise and knowledge of Mr Lowpro. I'm a very happy chappy.
He's not the messiah


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