Advertisement
alexdubovyck

Кол-во нажатых клавиш в трее

Jan 9th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. #UseHook
  2. #Persistent
  3.  
  4. KeyCount=0
  5.  
  6. ; SetTimer, Check, 10000 ;Check every 10 seconds
  7. SetTimer, Check, 1000 ;Check every 10 seconds
  8. ; return
  9.  
  10. Loop
  11. {
  12. ; Input, Key, L1 I V
  13. ; Input, Key, L1 C V
  14.  
  15. Input Key,L1 I V,{F1}{F2}{F3}{Capslock}{BS}{LSHIFT}
  16. ; If (WinActive("Ahk_Class XLMAIN") Or WinActive("Ahk_Class Notepad"))
  17. ; {
  18. ; AscKey:=Asc(Key)
  19. ; If (AscKey > 31 && AscKey < 127)
  20. KeyCount++
  21. ; countkeypress()
  22. TrayTip #1, %KeyCount%
  23. ; }
  24. }
  25.  
  26.  
  27.  
  28. Check:
  29. if A_Sec = 30
  30. {
  31. FileAppend, %KeyCount%`n, bpm.txt
  32. KeyCount=0
  33. }
  34. ; msgbox %A_Sec%
  35. ; TrayTip #2, %A_Sec%
  36. ; }
  37.  
  38. if A_Sec = 01
  39. {
  40. FileAppend, %KeyCount%`n, bpm.txt
  41. KeyCount=0
  42. }
  43. Return
  44.  
  45.  
  46. ;key
  47. ; 1::
  48. ; msgbox %KeyCount%
  49. ; TrayTip #1, %KeyCount%
  50. ; Sleep 3000 ; Let it display for 3 seconds.
  51. ; return
  52.  
  53. ;func;;
  54. countkeypress()
  55. {
  56. TrayTip #1, %KeyCount%
  57. Sleep 3000 ; Let it display for 3 seconds.
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement