Advertisement
Niseg

AutoHotkey macro enable disable - twerk+toggle mouse button

Jan 22nd, 2015
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; CTRL+F2 = repeat right click on/off
  2. ; CTRL+F3 = hold left click on/off
  3. ; F4      = repeat pressing shift (twerk)
  4. ; CTRL+F4 = hold to twerk (legacy)
  5. ; holding shift with first 3 macros will disable them (twerk macro presses shift)
  6. ;-------
  7. ; AutoHotkey Version: 1.x
  8. ; Language:       English
  9. ; Platform:       Win9x/NT
  10. ; Author:         A.N.Other <myemail@nowhere.com>
  11. ;
  12. ; Script Function:
  13. ;   Template script (you can customize this template by editing "ShellNew\Template.ahk" in your Windows folder)
  14. ;
  15.  
  16.  
  17. #NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
  18. SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
  19. SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
  20. TogR:=false
  21. TogL:=false
  22. Toggle:= false
  23. instance1:=0
  24. #MaxThreadsPerHotkey 2
  25. #MaxHotkeysPerInterval 1000
  26. ^F4::
  27. SetKeyDelay 10,30
  28. if (!instance1)
  29.     {
  30.     instance1=1
  31.         while GetKeyState("F4","P")
  32.         {
  33.         SendEvent {LShift}
  34.         ;sleep 10
  35.         }
  36.     instance1=0
  37.     }
  38.     return
  39.    
  40. F4::
  41. SetKeyDelay 10,30
  42.  
  43. Toggle := !Toggle
  44. ;if Toggle
  45. ; SoundBeep,1600,100
  46. ;else
  47. ;SoundBeep,500,100
  48.     While Toggle
  49.     {
  50.       SendEvent {LShift}
  51.       sleep,80
  52.     }
  53. return
  54. +F4::
  55. Toggle := false
  56. ;if Toggle
  57. ; SoundBeep,1200,200
  58. ;else
  59. ;SoundBeep,600,200
  60. return
  61.  
  62. ^F2::
  63. TogR:=!TogR
  64.     While TogR
  65.     {
  66.      Click right
  67.       sleep,50
  68.     }
  69. return
  70. +^F2::
  71. TogR:=false
  72. return
  73. ^F3::
  74. TogL:=!TogL
  75. if togL then
  76. Click down
  77. else
  78. Click up
  79. return
  80. +^F3::
  81. TogL:=false
  82. Click up
  83. return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement