I need help writing out the current time. Here is my script.
CURRENT TIME ON MY COMPUTER: 3:35 & 30 seconds
or military time: 15:34:30
SCAR Code:
program NameMe;
//{.Include SRL\SRL.scar}
var
BeginTime: Cardinal;
Varriable: Integer;
const
Constant = 0;
ScarName = 'Document1 - Microsoft Word';
procedure pCurrentTime;
var
h,m,s: Integer;
begin
// IF RUN SCRIPT FOR MORE THAN # /1000 SECONDS... THEN
if (GetSystemTime-BeginTime>6000) then
begin
WriteLn('--------------------------------------------------');
WriteLn('SECONDS Elapsed: '+FloatToStr((GetSystemTime-BeginTime)/1000));
WriteLn('MINUTES Elapsed: '+FloatToStr((GetSystemTime-BeginTime)/60000));
WriteLn('HOURS Elapsed: '+FloatToStr((GetSystemTime-BeginTime)/3600000));
end;
// I HAVE NO IDEA WHY THIS MUST BE SUBTRACTED
ConvertTime((GetSystemTime-(2547046+43200000+86400000+86400000)),h,m,s);
WriteLn('Current Time: '+FloatToStr(h)+':'+FloatToStr(m)+':'+FloatToStr(s));
end;
begin
BeginTime:=GetSystemTime;
Disguise(ScarName);
ClearDebug;
pCurrentTime;
//OTHER STUFF
end.
REPORT-BOX:
Current Time: 15:34:30
Successfully executed
If I merely use the following line...
SCAR Code:
ConvertTime(GetSystemTime,h,m,s);
WriteLn('Current Time: '+FloatToStr(h)+':'+FloatToStr(m)+':'+FloatToStr(s));
I receive this:
REPORT-BOX:
Current Time: 76:16:57
Successfully executed
Please help me understand this... I keep having to add a new "86400000" everyday.