#include HotKeySet("1","run_one") func run_one() $oldcount = FileReadLine("test.txt", 3) $result = StringCompare($oldcount, "999") if $result = 0 Then $newcount = 0 Else $newcount = $oldcount +1 EndIf _FileWriteToLine("test.txt", 3, $newcount, 1) MsgBox (0,"test",$newcount) EndFunc While 1 Sleep(100000) WEnd