I use the below ProntoScript throughout my configuration file per adding that "Press & Hold" functionality to a given button. A normal button press will invoke one function. An extended button press will invoke another. Have never experienced any issues. Works great!
var counter = 0;
onHold = function()
{ counter++;
if (counter==1) { doAnother(); }
}
onHoldInterval = 1000; onRelease = function()
{ if (counter==0) {doOneThing(); }
}Some examples per my use of "Press & Hold" shown below.
Activity (Button) / Normal Press / Extended PressActivity Page ("Page Up" hard button and "Power On" soft button):All components powered on except DVD/BD Changers. / All components powered on.Activity Page (Selecting an activity on-screen or via "OK" hard button):Appropriate macro is run based on global variables used to track power states. / Full macro is run irrespective of global variables.All pages while under a given activity. ("Power" hard button and "Home" soft button in upper right corner):Jump to "Activities" page. / Forces full macro to run for the given activity.All pages of config. (Invisible button in upper right corner of system area):Jump to "Lighting" activity. / Jump to "System Status" page.Blu-ray Changer:"Menu" hard/soft button -
PopUp Menu / Menu"Channel Up" hard button -
Skip Forward / Next Disc"Channel Down" hard button -
Skip Back / Previous Disc"Power On" soft button -
Display Power On / Blu-ray Changer Power On"Power Off" soft button -
Display Power Off / Blu-ray Changer Power OffDVD Changers:"Menu" hard/soft button -
Menu / Top Menu"Power On" soft button -
Display Power On / DVD Changer Power On"Power Off" soft button -
Display Power Off / DVD Changer Power OffHD DVR:"Guide" hard/soft button -
Guide / List (DVR Playlist)"Channel Up" hard button -
Skip Forward (30 seconds) / Channel Up"Channel Down" hard button -
Skip Back (5 seconds) / Channel Down"Power On" soft button -
Display Power On / HD DVR Power On"Power Off" soft button -
Display Power Off / HD DVR Power OffXM Radio:"Power On" soft button -
Display Power On / XM Radio Power On"Power Off" soft button -
Display Power Off / XM Radio Power Off
Last edited by Lowpro on September 13, 2010 14:44.