Advertisement
Guest User

Untitled

a guest
Dec 13th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.85 KB | None | 0 0
  1. HotKeySet("{F3}", "lclick") ;  Sets F3 as a hotkey to start the program
  2. HotKeySet("{F4}", "lclickslow") ;  Sets F3 as a hotkey to start the program
  3. HotKeySet("{F7}", "RestartScript") ;  Sets F5 as a hotkey to restart the progam
  4. HotKeySet("{F8}", "ExitProg") ;  Sets F6 as a hotkey to exit the progam
  5.  
  6. While 1
  7.     Sleep(100)   ;  Waits for function call
  8.     Wend
  9.  
  10. Func lclick()
  11.     while 1
  12.     MouseClick("left") ; Left click
  13.     Sleep(20)
  14.     WEnd
  15. EndFunc
  16.  
  17. Func lclickslow()
  18.     while 1
  19.     MouseClick("left") ; Left click
  20.     Sleep(100)
  21.     WEnd
  22. EndFunc
  23.  
  24. Func ExitProg()
  25.     Exit 0  ;  Exits the program
  26.  EndFunc
  27.  
  28. Func RestartScript()
  29.     If @Compiled = 1 Then
  30.         Run( FileGetShortName(@ScriptFullPath))
  31.     Else
  32.         Run( FileGetShortName(@AutoItExe) & " " & FileGetShortName(@ScriptFullPath))
  33.     EndIf
  34.     Exit
  35. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement