I have a compiled script :-timeStampSecs.exe which returns timestamp in seconds. I call it in FileWrite to write the time stamp in a text file.But it writes some other values instead of the timestamp. Please help.
thanks
olmar
The script is below:-
$kNum=run("timeStampSecs.exe","",1); also tried with flags 2,4,8,10
$hFile=FileOpen("timeStamp.txt",2)
FileWrite($hFile,"the key is: "&$kNum)
FileClose("$hFile")
;Code of thetimeStampSecs.exe:-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#include <Date.au3>
Func secFromEpoch()
Local $ts=_DateDiff( "s","1970/01/01 00:00:00",_NowCalc())
$ts=String($ts)
ConsoleWrite("timeStamp is: "&$ts&@CRLF)
Return $ts
EndFunc
secFromEpoch()