Code: Select all
#Requires AutoHotkey v1.1.33
inputFile := A_ScriptDir "\TestClient.txt"
Loop Read, % inputFile
{ timeStamp := SubStr(A_LoopReadLine, 1, 19)
If InStr(A_LoopReadLine, "*") ; Log file opening
(t1) && showDif(t1, t2), t1 := RegExReplace(timeStamp, "[/: ]")
Else t2 := RegExReplace(timeStamp, "[/: ]") ; Not log file opening
}
showDif(t1, t2)
showDif(t1, t2) {
Static n := 0
dif := t2
dif -= t1, S
MsgBox 0, % "Result #" ++n, % Format("t1 = {}`nt2 = {}`n`nDifference = {:.1f} min", t1, t2, dif / 60)
}