Advertisement
Tiavor

my ahk scripts

Jul 3rd, 2017
863
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; v1.3
  2. setCapsLockState, AlwaysOff
  3. ; disable the normal function of capslock
  4.  
  5. ; ~ passthough
  6. ; $ ignore trigger by ahk script
  7.  
  8. ;GuildWars2
  9. ;jump-dodge
  10. ~XButton1::
  11. WinGetTitle, id, A
  12. if (id=="Guild Wars 2"){
  13.  if GetKeyState("CapsLock","p")
  14.   Send, {Space}
  15. }
  16. return
  17.  
  18. $Numpad1::
  19. WinGetTitle, id, A
  20. if (id=="Guild Wars 2"){
  21.  if GetKeyState("CapsLock","p")
  22.   Send, {Numpad5}
  23.  else
  24.   Send, {Numpad1}
  25. }
  26. else
  27.  Send, {Numpad1}
  28. return
  29.  
  30. $Numpad3::
  31. WinGetTitle, id, A
  32. if (id=="Guild Wars 2"){
  33.  if GetKeyState("CapsLock","p")
  34.   Send, {Numpad6}
  35.  else
  36.   Send, {Numpad3}
  37. }
  38. else
  39.  Send, {Numpad3}
  40. return
  41.  
  42. ;general stuff
  43. ;fast click
  44. x := 25
  45. $~LButton::
  46. loop,
  47. {
  48.   if GetKeyState("LButton","p") and GetKeyState("CapsLock","p")
  49.     Send, {Click}
  50.   else
  51.     break
  52.   sleep, x
  53. }
  54. return
  55.  
  56.  
  57. ;media functions
  58. $p::
  59. if GetKeyState("CapsLock","p")
  60. Send, {Media_Play_Pause}
  61. else
  62. Send, p
  63. return
  64.  
  65. $Up::
  66. if GetKeyState("CapsLock","p"){
  67. Send, {Volume_Up}
  68. }
  69. else
  70. Send, {Up}
  71. return
  72.  
  73. $Down::
  74. if GetKeyState("CapsLock","p"){
  75. Send, {Volume_Down}
  76. }
  77. else
  78. Send, {Down}
  79. return
  80.  
  81. $Left::
  82. if GetKeyState("CapsLock","p"){
  83. Send, {Media_Prev}
  84. }
  85. else
  86. Send, {Left}
  87. return
  88.  
  89. $Right::
  90. if GetKeyState("CapsLock","p")
  91. Send, {Media_Next}
  92. else
  93. Send, {Right}
  94. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement