Advertisement
EzFlow997

LettuceIsPog Example

Mar 3rd, 2024 (edited)
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 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.  
  19. Exit(){
  20. Send {w Up}
  21. Send {d Up}
  22. MouseClick, Left,,,,,U
  23. ;Send {LShift Up}
  24. ExitApp
  25. }
  26.  
  27. global toggleActive := false
  28.  
  29. SetTimer, KeyListener, 100
  30.  
  31. KeyListener(){
  32. GetKeyState, keyOne, M
  33. if(keyOne = "D" and toggleActive = false){
  34. While(keyOne = "D"){
  35. GetKeyState, keyOne, M
  36. }
  37. toggleActive := true
  38. Send {w Down}
  39. Send {d Down}
  40. MouseClick, Left,,,,,D
  41. ;Send {LShift Down}
  42. ;Tooltip, Active
  43. }
  44. if(keyOne = "D" and toggleActive = true){
  45. While(keyOne = "D"){
  46. GetKeyState, keyOne, M
  47. }
  48. toggleActive := false
  49. Send {w Up}
  50. Send {d Up}
  51. MouseClick, Left,,,,,U
  52. ;Send {LShift Up}
  53. ;Tooltip, Not Active
  54. }
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement