Following are original code, running fine on my pc.
Please help me to add timeOK check.
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );
tn = TimeNum();
startTime = 091759; // start in HHMMSS format
endTime = 155059; // end in HHMMSS format
timeOK = tn >= startTime AND tn <= endTime;
TimeFrame=60;
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
if ( NewPeriod ) // every 1 min copying chart as image and this is running fine using this since last 1 year, hence pls help me to add timeOK check.
{
ShellExecute("wscript.exe", "intraday.js", ".\\Scripts"); // AND TimeNum()<=130659 ; //AND today !=0 OR today !=6 ;
}
Please help me to add timeOK check.
function GetSecondNum()
{
Time = Now( 4 );
Seconds = int( Time % 100 );
Minutes = int( Time / 100 % 100 );
Hours = int( Time / 10000 % 100 );
SecondNum = int( Hours * 60 * 60 + Minutes * 60 + Seconds );
return SecondNum;
}
RequestTimedRefresh( 1 );
tn = TimeNum();
startTime = 091759; // start in HHMMSS format
endTime = 155059; // end in HHMMSS format
timeOK = tn >= startTime AND tn <= endTime;
TimeFrame=60;
SecNumber = GetSecondNum();
Newperiod = SecNumber % TimeFrame == 0;
SecsLeft = SecNumber - int( SecNumber / TimeFrame ) * TimeFrame;
SecsToGo = TimeFrame - SecsLeft;
if ( NewPeriod ) // every 1 min copying chart as image and this is running fine using this since last 1 year, hence pls help me to add timeOK check.
{
ShellExecute("wscript.exe", "intraday.js", ".\\Scripts"); // AND TimeNum()<=130659 ; //AND today !=0 OR today !=6 ;
}
if(NewPeriod and TimeOK)
{..............} it should work. Thnx