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 2 made on Wednesday November 10, 2010 at 23:26
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
13,007
Assuming you simply want to not send IR until such time a release occurs and only if the button is held for a specific time period, you can:

Use new Date().valueOf() to calculate start time.

Then, in the onRelease() function of the widget, calculate time again using same operation. Subtract the "released" time from the "start" time and if greater than some value, call executeActions() or scheduleActions() on the same widget.

Assuming the button that contains the IR action that needs to be sent, by adding the IR code to the ActionList and then enabling ProntoScript for said button, code the following. It is relatively simple.

var start = new Date().valueOf();
onRelease = function()
{
var now = new Date().valueOf();
if ((now - start) >= 1000)
this.executeActions();
}
Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse