Advertisement
Guest User

Untitled

a guest
Sep 9th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. HotKeySet("{F2}","onoff")
  2. HotKeySet("{F4}","exitapp")
  3. HotKeySet("{F1}","record1")
  4.  
  5. Dim $mpos, $pos
  6. $click = False
  7. $count = 0
  8.  
  9. Func exitapp()
  10.    Exit
  11. EndFunc
  12.  
  13.  
  14.     WinWait("UCClient")
  15. Func record1()
  16.     $mpos = MouseGetPos()
  17. EndFunc
  18.  
  19. Func onoff()
  20.    If $click = False Then
  21.       $click = True
  22.    Else
  23.       $click = False
  24.    EndIf
  25. EndFunc
  26. While True
  27.     $pos = WinGetPos("UCClient")
  28.     If @error Then
  29.         MsgBox(0,"Error","Window not found.")
  30.         Sleep(3000)
  31.     EndIf
  32.    
  33.     If $click = True Then
  34. $count = 0
  35.     MouseClick("left",$mpos[0],$mpos[1],1,0)
  36.     Send("/mine{ENTER}")
  37.         While $count < 1
  38.             $coords = PixelSearch(($pos[0]+$pos[2]),($pos[1]+$pos[3]),$pos[0],$pos[1],0x00C091,1)
  39.             If Not @error Then
  40.             MouseClick("left",$coords[0],$coords[1],1,0)
  41.             $count = $count + 1
  42.             EndIf
  43.         WEnd
  44.     EndIf
  45. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement