Forum Discussion
Submit Result Trigger at a Specific Daily Time
HI Uychhorng,
I have updated the script below, please use the same in slide master javascript
var myVar = setInterval(myTimer, 1000);
var flag = true;
function myTimer() {
var currentTime = new Date()
var month = currentTime.getMonth() + 1
var day = currentTime.getDate()
var year = currentTime.getFullYear()
var hour = currentTime.getHours();
var minute = currentTime.getMinutes();
var timeString=hour;
if (timeString=="12"|| timeString == 12 && flag== true){
flag = false;
myStopFunction();
var player = GetPlayer();
player.SetVar("SystemTime",timeString);
}
}
function myStopFunction() {
clearInterval(myVar);
}
Now you need to add the another Trigger in Master slide
jump to result slide when variable changes and select "timeString" variable and add if condition . you need to select timeString== 12;
I hope this should work.
Regards
Raj
- UychhorngKhan-84 years agoCommunity Member
Hi Raj,
Would you mind if I ask you a question about this updated code? I am wondering about this part:
What does it mean? Does it mean that the timeString flag will change (equal to 12 pm or after 12 pm onward?) then the variable will flag as "false"?
Thanks,
Chhorng
if (timeString=="12"|| timeString == 12 && flag== true){
flag = false;
myStopFunction();
var player = GetPlayer();
player.SetVar("SystemTime",timeString);
}
}
function myStopFunction() {
clearInterval(myVar);
}
Related Content
- 6 months ago
- 10 years ago