Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

TSW mouselook toggle script for AHK

By: a guest on Jul 28th, 2012  |  syntax: None  |  size: 0.61 KB  |  views: 127  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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. }