Advertisement
Guest User

TSW mouselook toggle script for AHK

a guest
Jul 28th, 2012
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #NoEnv
  2. #SingleInstance Force
  3. #IfWinActive The Secret World
  4.  
  5. MouseLook = 1
  6. Gosub, ToggleCursor
  7.  
  8. ; Define your Toggle keybind, default is CapsLock. List of keys here: www.autohotkey.com/docs/KeyList.htm
  9. ~CapsLock::
  10. Gosub, ToggleCursor
  11. Return
  12.  
  13. Esc::
  14. if (MouseLook)
  15. {
  16. Gosub, ToggleCursor
  17. Send {Esc}
  18. }
  19. Else
  20. Send {Esc}
  21. Return
  22.  
  23. ToggleCursor:
  24. if MouseLook = 0
  25. {
  26. Send {RButton Down}
  27. MouseLook = 1
  28. }
  29. else
  30. {
  31. Send {RButton Up}
  32. MouseLook = 0
  33. }
  34. Hotkey,*LButton,Toggle
  35. Hotkey,*LButton UP,Toggle
  36. Hotkey,*RButton,Toggle
  37. Hotkey,*RButton UP,Toggle
  38. Return
  39.  
  40. #If (MouseLook)
  41. {
  42. LButton::1
  43. RButton::2
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement