Guest User

Untitled

a guest
Jan 11th, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.44 KB | None | 0 0
  1. 2#include <Misc.au3>
  2. Local $key = True, $started = False, $hDLL = DllOpen("user32.dll")
  3. While 1
  4.     If _IsPressed("50", $hDLL) Then
  5.         If $started == False Then
  6.             $started = True
  7.             AdlibRegister("_sendkeys", 1000)
  8.         Else
  9.             $started = False
  10.             AdlibUnRegister("_sendkeys")
  11.         EndIf
  12.         Sleep(3)
  13.     EndIf
  14. WEnd
  15. DllClose($hDLL)
  16.  
  17. Func _sendkeys()
  18.     If $key == True Then
  19.         Send("1")
  20.         $key = False
  21.     Else
  22.         Send("2")
  23.         $key = True
  24.     EndIf
  25. EndFunc
Add Comment
Please, Sign In to add comment