Advertisement
EzFlow997

NoelleEvilyn Example v2

Mar 3rd, 2024
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.45 KB | None | 0 0
  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. #SingleInstance Force
  6. ;#NoTrayIcon
  7. SetBatchLines, -1
  8. SetKeyDelay, -1, 1
  9. SetControlDelay, -1
  10. SetMouseDelay, -1
  11. SetWinDelay, -1
  12. SetBatchLines, -1
  13. ListLines, Off
  14. PID := DllCall("GetCurrentProcessId")
  15. Process, Priority, %PID%, High
  16.  
  17. Hotkey, ^1, Exit
  18. Hotkey, ^2, ToggleOn
  19. Hotkey, ^3, ToggleOff
  20.  
  21. Exit(){
  22. ExitApp
  23. }
  24.  
  25. global toggle := 0
  26. global count := 0
  27. global ticks := 0
  28.  
  29. global freq := 0
  30. global CounterAfter := 0
  31. global CounterBefore := 0
  32.  
  33. ToggleOn(){
  34. if(toggle = 0){
  35. toggle := 1
  36. Start()
  37. }
  38. }
  39.  
  40. ToggleOff(){
  41. if(toggle = 1){
  42. toggle := 0
  43. }
  44. }
  45.  
  46. Start(){
  47. While(toggle = 1){
  48. Send {Space Down}
  49. DllCall("QueryPerformanceFrequency", "Int64*", freq)
  50. DllCall("QueryPerformanceCounter", "Int64*", CounterBefore)
  51. DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
  52. While((CounterAfter - CounterBefore) / freq * 1000 <= 922){
  53. DllCall("QueryPerformanceCounter", "Int64*", CounterAfter)
  54. }
  55. Send {Space Up}
  56. ;Debug()
  57. }
  58. }
  59.  
  60. Debug(){
  61. temp := (CounterAfter - CounterBefore) / freq * 1000
  62. count := count + temp
  63. d := count/temp
  64. Tooltip, Tick Between Down and Up: %temp%`nLoop Iterations: %d%
  65. }
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement