Advertisement
Guest User

Untitled

a guest
Aug 7th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  2. ; #Warn  ; Enable warnings to assist with detecting common errors.
  3. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  4. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  5.  
  6. startTime := 0
  7. timeArray := []
  8.  
  9. ~RButton::
  10. startTime := A_TickCount
  11. ;MsgBox, %startTime%
  12. timeArray:= []
  13. return
  14.  
  15. +~Lbutton::
  16. ;^j::
  17. timeArray.Push(A_TickCount - startTime)
  18. startTime := A_TickCount
  19. return
  20.  
  21. !^RButton::
  22. file := FileOpen("myFile.txt", "r")
  23. for timeStamp in timeArray
  24. {
  25.     file.write(timeArray[timeStamp])
  26.     file.write("`n")
  27. }
  28. file.write("Done")
  29. file.write("`n")
  30. file.Close()
  31. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement