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 5 made on Saturday February 18, 2023 at 12:25
Lyndel McGee
RC Moderator
Joined:
Posts:
August 2001
12,999
Try this.

/*!
@title test5.v-Fischer
@version 1.0
@author v Fischer
*/

var updateInterval = 60 * 1000; // 1 min; in msec

function getDate() {
d = new Date();
return d.getFullYear() + "-" + ("0" + Number(d.getMonth()+1)).slice(-2)+"-"+ d.getDate() + "T" + GUI.getDisplayTime() + ":" + ("0" + d.getSeconds()).slice(-2);
}

function time() {
var timePattern = new RegExp('(\\d+):(\\d+)((am|pm)*)','g');
GUI.getDisplayTime().match(timePattern);


var hour = parseInt(RegExp.$1,10);
var minute = parseInt(RegExp.$2,10);

if (hour === 3 && minute === 55) {CF.widget("A4","B","C").executeActions();}

var ampm = RegExp.$3;
var seconds = new Date().getSeconds();
}

//removed per reasons in previous post
//time();

/*
schedule periodic updates for when the TSU sits in the charging dock
and it is powered on.
*/
function periodicUpdate_2(activity) {
System.setDebugMask(9);
System.print(getDate() + " [ScheduleAfter]_____TIMER");
time();
activity.scheduleAfter(updateInterval, periodicUpdate_2, activity);
}

// Kick off new timer for the current activity.
periodicUpdate_2(CF.activity());

Lyndel McGee
Philips Pronto Addict/Beta Tester


Hosting Services by ipHouse