Advertisement
Schknheit

autoclicker

Dec 15th, 2016
13,991
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.20 KB | None | 0 0
  1. #SingleInstance, Force
  2. CoordMode, Mouse, Screen
  3. ; Global Variables
  4. ;----------------------------------------
  5. Global Temp_Control_ID :=
  6. Global The_Control_ID_For_Clicker1 := Null
  7. Global Size_Of_X1 := 40
  8. Global Size_Of_Y1 := 40
  9. Global X_Pos1 :=
  10. Global Y_Pos1 :=
  11. Global Temp_X_Pos :=
  12. Global Temp_Y_Pos :=
  13. Global Clicker_1_On
  14. Global Shift1_Yes
  15. Global Speed1_Slow
  16. Global Speed1_Med
  17. Global Speed1_Fast
  18. Global Use_ID_1_Yes
  19. Global Stop_Clicking1 := 0
  20. ;----------------------------------------------------
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27. ; Gui Layout
  28. ;------------------
  29. ;-------------------------------
  30. ;------------------------------------------------
  31. Gui, Font, cAqua
  32. Gui, Add, Text,cAqua x10 y10, Auto Start/Stop Auto Clicker #1
  33. Gui, Add, Radio,cAqua x+80 vClicker_1_On,On /
  34. Gui, Add, Radio,cAqua x+10 vClicker_1_Off,Off
  35. Gui, Add, Button,cAqua x+40 w20 h15 gHint1, ?
  36. ;--------------------------------------------------------
  37. Gui, Add, Text,cAqua x10 y+10, Use Control ID?
  38. Gui, Add, Radio,cAqua x+20 vUse_ID_1_Yes, Yes /
  39. Gui, Add, Radio,cAqua x+10 vUse_ID_1_No, No
  40. Gui, Add, Button,cAqua x+10 w150 h15 gGet_ID_For_Clicker1,Get Control ID
  41. Gui, Add, Button,cAqua x+14 w20 h15 gHint2, ?
  42. ;-------------------------------------------------------------
  43. Gui, Add, Text,cAqua x10 y+10, Control ID:
  44. Gui, Add, Edit,cBlack x+20 w270 h15 vThe_Control_ID_For_Clicker1, %The_Control_ID_For_Clicker1%
  45. Gui, Add, Button,cAqua x+23 w20 h15 gHint3, ?
  46. ;----------------------------------------------------------------
  47. Gui, Add, Text,cAqua x10 y+10, Auto Restart Zone Size: X =
  48. Gui, Add, Edit,cBlack x+10 w50 h15 vSize_Of_X1, %Size_Of_X1%
  49. Gui, Add, Text,cAqua x+20, Y =
  50. Gui, Add, Edit,cBlack x+10 w50 h15 vSize_Of_Y1, %Size_Of_Y1%
  51. Gui, Add, Button,cAqua x+45 w20 h15 gHint4, ?
  52. ;--------------------------------------------------------------------
  53. Gui, Add, Text,cAqua x10 y+10, Click Location:
  54. Gui, Add, Edit,cBlack x+15 w150 h15 vThe_Click_Coords1, X = %X_Pos1% Y = %Y_Pos1%
  55. Gui, Add, Button,cAqua x+15 w100 h15 gGet_X_And_Y_Clicker1, Get X And Y
  56. Gui, Add, Button,cAqua x+13 w20 h15 gHint5, ?
  57. ;----------------------------------------------------------------------------
  58. Gui, Add, Text,cAqua x10 y+10, Click Speed:
  59. Gui, Add, Radio,cAqua x+30 vSpeed1_Slow, Slow
  60. Gui, Add, Radio,cAqua x+30 vSpeed1_Med, Med
  61. Gui, Add, Radio,cAqua x+30 vSpeed1_Fast, Fast
  62. Gui, Add, Button,cAqua x+83 w20 h15 gHint6, ?
  63. ;--------------------------------------------------------------------------
  64. Gui, Add, Text,cAqua x10 y+10, Shift Click?
  65. Gui, Add, Radio,cAqua x+30 vShift1_Yes, Yes
  66. Gui, Add, Radio,cAqua x+30 vShift1_No, No
  67. Gui, Add, Button,cAqua x+174 w20 h15 gHint7, ?
  68. ;------------------------------------------------------------------
  69.  
  70. Gui, Add, Button,cAqua x10 y+10 w100 h20 gUpdate1, Update
  71. Gui, Add, Button,cAqua x+20 w100 h20 gStart_Clicker1, Start Auto Clicker
  72. Gui, Add, Button,cAqua x+20 w100 h20 gStop_Auto_Clicker1, Stop Auto Clicker
  73. Gui, Add, Button,cAqua x+23 w20 h15 gHint8, ?
  74. Gui, Add, Text,cAqua x5 y+10,*************************************************************************************************
  75. Gui, Color, Black
  76. Gui, Show, w400 , Hellbents Auto Start/Stop Clicker
  77. return
  78.  
  79.  
  80.  
  81. ; Controls
  82. ;---------------------------------------
  83.  
  84.  
  85. Get_ID_For_Clicker1:
  86. Gui, +AlwaysOnTop
  87. Get_control_ID()
  88. The_Control_ID_For_Clicker1 := Temp_Control_ID
  89. GuiControl,, The_Control_ID_For_Clicker1, % The_Control_ID_For_Clicker1
  90. Gui, -AlwaysOnTop
  91. return
  92.  
  93. Get_X_And_Y_Clicker1:
  94. Gui, +AlwaysOnTop
  95. Get_Click_Location()
  96. X_Pos1 := Temp_X_Pos
  97. Y_Pos1 := Temp_Y_Pos
  98. GuiControl,, The_Click_Coords1, X = %X_Pos1% Y = %Y_Pos1%
  99. Sleep, 100
  100. Gui, -AlwaysOnTop
  101. return
  102.  
  103. UpDate1:
  104. Gui, Submit, NoHide
  105. return
  106.  
  107. Start_Clicker1:
  108. Run_Auto_Clicker1()
  109. return
  110.  
  111.  
  112. Stop_Auto_Clicker1:
  113. Stop_Clicking1 := 1
  114. return
  115.  
  116. Hint1:
  117. msgbox,,Hint 1, Select Yes to turn the auto clicker on`n
  118. ,`nTurning the auto clicker on does not make the clicker start clicking,`nbut this allows that to be a option`n
  119. ,`nThis was added because there is/was plans to add more features to this auto clicker at a later date
  120. return
  121. Hint2:
  122. msgbox,,Hint 2, Most windows, tabs, etc have a hidden ID.
  123. ,`n`nBy turning this on you are making it so that the auto clicker
  124. ,`nwill only click the page you want it to so you don't have to worry that the
  125. ,`nclicker clicks something you don't want it to
  126. .`n`n To use this, Click the "Get Control ID" Button
  127. .`nAfter you have clicked the button a tooltip will show up
  128. .`nNow click on the surface you want to get the id from
  129. ,`nThe next time you press the left mouse button after selecting the Get Control ID it will store that value into the edit field below
  130. .`n`n`n`n*Note, After you select the get "Get Control ID" Button
  131. ,`nthe very next time you press the left mouse button
  132. ,`n you will be setting your Control ID.
  133.  
  134. return
  135. Hint3:
  136. msgbox,,Hint 3, This is the Control ID that you get from pressing the "Get Control ID" `n one line above this one
  137. .`n`n Note that you can set a default by changing the Control ID Global variable in the script
  138. return
  139. Hint4:
  140. msgbox,,Hint 4, This sets the size of an imaginary box that surrounds the place you select to click
  141. .`n`n By moving your mouse in or out of this box will start or stop the auto clicker
  142. .`n`nThis only comes into effect once you have started the auto clicker and then moved your mouse for the first time
  143. .`n`n`nNote that the larger the box you set, the faster you will have to move your mouse to get the clicker to pause
  144. .`n`nA somewhat small box is suggested (20 x 20 y) but a larger box is fine.
  145. return
  146. Hint5:
  147. msgbox,,Hint 5, This sets where you want the auto clicker to click
  148. .`n`n`nTo set this point, press the "Get X And Y" Button
  149. .`n`n`nNext, move your mouse to where you want the auto clicker to click
  150. .`n`nNext, Click the left mouse button to lock that position
  151. .`n`nThe value of the x and y will show up in the edit field
  152. .`n`n`nYou can set a default location by changing the X1_Pos and Y1_Pos variables in the script
  153. .`n`n`n`n*Note, After you select the get x and y button
  154. ,`nthe very next time you press the left mouse button
  155. ,`n you will be setting your x and y.
  156. return
  157. Hint6:
  158. msgbox,,Hint 6, This is how you select how fast you want your auto clicker to click
  159. .`n`n The values are
  160. .`nSlow is a 10 second delay between clicks
  161. .`nMed is a 1 second delay between clicks
  162. .`nFast is a 30 ms delay between clicks
  163. .`n`nYou can change the delay for each by finding the "Clicker1_Delay()" `nFunction at the bottom of the script.
  164. return
  165. Hint7:
  166. msgbox,,Hint 7, This allows you to set the auto clicker to "Shift Click"
  167. .`n`nEach time the auto clicker clicks, it will hold down the shift button
  168. .`n`n*Note, the first click after you start the auto clicker may not act as a shift click*
  169. return
  170. Hint8:
  171. msgbox,,Hint 8, Here are three Buttons
  172. .`n`nThe update button, updates the values you have set in the gui
  173. .`nFor most of the values, you must press the update button for them to take effect
  174. .`n`nThe Start button starts the script for the first time
  175. .`n`nThe Stop button stops the auto clicker from clicking.
  176. return
  177. Get_control_ID()
  178. {
  179. isPressed := 0
  180. ;Sleep, 1000
  181. Loop
  182. {
  183. MouseGetPos,,,,The_ID
  184. tooltip,%The_ID%
  185. GetKeyState, Mouse_State, LButton
  186. Mouse_State := GetKeyState("LButton")
  187. ;tooltip,%Mouse_State%
  188. if(Mouse_State==0)
  189. {
  190. isPressed := 1
  191. }
  192. if(isPressed==1)
  193. {
  194. if(Mouse_State==1)
  195. {
  196. Temp_Control_ID := The_ID
  197. isPressed := 0
  198. ToolTip
  199. break
  200. }
  201. }
  202. }
  203. }
  204.  
  205. Get_Click_Location()
  206. {
  207. isPressed := 0
  208. ;Sleep, 1000
  209. Loop
  210. {
  211. MouseGetPos,The_X_Pos,The_Y_Pos
  212. tooltip,%The_X_Pos% %The_Y_Pos%
  213. GetKeyState, Mouse_State, LButton
  214. Mouse_State := GetKeyState("LButton")
  215. ;tooltip,%Mouse_State%
  216. if(Mouse_State==0)
  217. {
  218. isPressed := 1
  219. }
  220. if(isPressed==1)
  221. {
  222. if(Mouse_State==1)
  223. {
  224. Temp_X_Pos := The_X_Pos
  225. Temp_Y_Pos := The_Y_Pos
  226. isPressed := 0
  227. ToolTip
  228. break
  229. }
  230. }
  231. }
  232. }
  233.  
  234. Run_Auto_Clicker1()
  235. {
  236. zone1_x_size := Size_Of_X1//2
  237. zone1_y_size := Size_Of_Y1//2
  238. isPaused1 := 0
  239.  
  240. if(Clicker_1_On==True)
  241. {
  242. Loop
  243. {
  244. if(isPaused1==0)
  245. {
  246. if(Stop_Clicking1==1)
  247. {
  248. break
  249. }
  250. if(Shift1_Yes==True)
  251. {
  252. send, {shift down}
  253. }
  254. Click, %X_Pos1% %Y_Pos1%
  255. if(Shift1_Yes==True)
  256. {
  257. send, {shift up}
  258. }
  259. ;i++
  260. ;tooltip, %i%
  261. MouseGetPos,X1, Y1
  262. if(X1!=X_Pos1||Y1!=Y_Pos1)
  263. {
  264. isPaused1:=1
  265. ;Sleep, 500
  266. }
  267. Clicker1_Delay()
  268. }
  269. if(isPaused1==1)
  270. {
  271. if(Use_ID_1_Yes==True)
  272. {
  273. MouseGetPos, X1, Y1,,ctrl
  274. if(ctrl=The_Control_ID_For_Clicker1&&X1<=(X_Pos1+zone1_x_size)&&X1>=(X_Pos1-zone1_x_size)&&Y1<=(Y_Pos1+zone1_y_size)&&Y1>=(Y_Pos1-zone1_y_size))
  275. {
  276. isPaused1 := 0
  277. }
  278. if(Stop_Clicking1==1)
  279. {
  280. break
  281. }
  282. }
  283. else
  284. {
  285. MouseGetPos, X1, Y1
  286. if(X1<=(X_Pos1+zone1_x_size)&&X1>=(X_Pos1-zone1_x_size)&&Y1<=(Y_Pos1+zone1_y_size)&&Y1>=(Y_Pos1-zone1_y_size))
  287. {
  288. isPaused1 := 0
  289. }
  290. if(Stop_Clicking1==1)
  291. {
  292. break
  293. }
  294. }
  295. }
  296. }
  297. }
  298. Stop_Clicking1 := 0
  299. }
  300.  
  301. Clicker1_Delay()
  302. {
  303. if(Speed1_Slow==True)
  304. Sleep, 10000
  305. if(Speed1_Med==True)
  306. Sleep, 1000
  307. if(Speed1_Fast==True)
  308. Sleep, 30
  309. }
  310. ^z::Pause
  311. ^x::ExitApp
Advertisement
Comments
  • amn1989
    1 year
    # text 0.19 KB | 0 0
    1. The best auto clicker for PC is definitely Zeus Auto Clicker! I used it for a while and I'm super satisfied with the performance. Check it out for yourself at https://www.zeusautoclicker.com/
Add Comment
Please, Sign In to add comment
Advertisement