Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #SingleInstance, Force
- CoordMode, Mouse, Screen
- ; Global Variables
- ;----------------------------------------
- Global Temp_Control_ID :=
- Global The_Control_ID_For_Clicker1 := Null
- Global Size_Of_X1 := 40
- Global Size_Of_Y1 := 40
- Global X_Pos1 :=
- Global Y_Pos1 :=
- Global Temp_X_Pos :=
- Global Temp_Y_Pos :=
- Global Clicker_1_On
- Global Shift1_Yes
- Global Speed1_Slow
- Global Speed1_Med
- Global Speed1_Fast
- Global Use_ID_1_Yes
- Global Stop_Clicking1 := 0
- ;----------------------------------------------------
- ; Gui Layout
- ;------------------
- ;-------------------------------
- ;------------------------------------------------
- Gui, Font, cAqua
- Gui, Add, Text,cAqua x10 y10, Auto Start/Stop Auto Clicker #1
- Gui, Add, Radio,cAqua x+80 vClicker_1_On,On /
- Gui, Add, Radio,cAqua x+10 vClicker_1_Off,Off
- Gui, Add, Button,cAqua x+40 w20 h15 gHint1, ?
- ;--------------------------------------------------------
- Gui, Add, Text,cAqua x10 y+10, Use Control ID?
- Gui, Add, Radio,cAqua x+20 vUse_ID_1_Yes, Yes /
- Gui, Add, Radio,cAqua x+10 vUse_ID_1_No, No
- Gui, Add, Button,cAqua x+10 w150 h15 gGet_ID_For_Clicker1,Get Control ID
- Gui, Add, Button,cAqua x+14 w20 h15 gHint2, ?
- ;-------------------------------------------------------------
- Gui, Add, Text,cAqua x10 y+10, Control ID:
- Gui, Add, Edit,cBlack x+20 w270 h15 vThe_Control_ID_For_Clicker1, %The_Control_ID_For_Clicker1%
- Gui, Add, Button,cAqua x+23 w20 h15 gHint3, ?
- ;----------------------------------------------------------------
- Gui, Add, Text,cAqua x10 y+10, Auto Restart Zone Size: X =
- Gui, Add, Edit,cBlack x+10 w50 h15 vSize_Of_X1, %Size_Of_X1%
- Gui, Add, Text,cAqua x+20, Y =
- Gui, Add, Edit,cBlack x+10 w50 h15 vSize_Of_Y1, %Size_Of_Y1%
- Gui, Add, Button,cAqua x+45 w20 h15 gHint4, ?
- ;--------------------------------------------------------------------
- Gui, Add, Text,cAqua x10 y+10, Click Location:
- Gui, Add, Edit,cBlack x+15 w150 h15 vThe_Click_Coords1, X = %X_Pos1% Y = %Y_Pos1%
- Gui, Add, Button,cAqua x+15 w100 h15 gGet_X_And_Y_Clicker1, Get X And Y
- Gui, Add, Button,cAqua x+13 w20 h15 gHint5, ?
- ;----------------------------------------------------------------------------
- Gui, Add, Text,cAqua x10 y+10, Click Speed:
- Gui, Add, Radio,cAqua x+30 vSpeed1_Slow, Slow
- Gui, Add, Radio,cAqua x+30 vSpeed1_Med, Med
- Gui, Add, Radio,cAqua x+30 vSpeed1_Fast, Fast
- Gui, Add, Button,cAqua x+83 w20 h15 gHint6, ?
- ;--------------------------------------------------------------------------
- Gui, Add, Text,cAqua x10 y+10, Shift Click?
- Gui, Add, Radio,cAqua x+30 vShift1_Yes, Yes
- Gui, Add, Radio,cAqua x+30 vShift1_No, No
- Gui, Add, Button,cAqua x+174 w20 h15 gHint7, ?
- ;------------------------------------------------------------------
- Gui, Add, Button,cAqua x10 y+10 w100 h20 gUpdate1, Update
- Gui, Add, Button,cAqua x+20 w100 h20 gStart_Clicker1, Start Auto Clicker
- Gui, Add, Button,cAqua x+20 w100 h20 gStop_Auto_Clicker1, Stop Auto Clicker
- Gui, Add, Button,cAqua x+23 w20 h15 gHint8, ?
- Gui, Add, Text,cAqua x5 y+10,*************************************************************************************************
- Gui, Color, Black
- Gui, Show, w400 , Hellbents Auto Start/Stop Clicker
- return
- ; Controls
- ;---------------------------------------
- Get_ID_For_Clicker1:
- Gui, +AlwaysOnTop
- Get_control_ID()
- The_Control_ID_For_Clicker1 := Temp_Control_ID
- GuiControl,, The_Control_ID_For_Clicker1, % The_Control_ID_For_Clicker1
- Gui, -AlwaysOnTop
- return
- Get_X_And_Y_Clicker1:
- Gui, +AlwaysOnTop
- Get_Click_Location()
- X_Pos1 := Temp_X_Pos
- Y_Pos1 := Temp_Y_Pos
- GuiControl,, The_Click_Coords1, X = %X_Pos1% Y = %Y_Pos1%
- Sleep, 100
- Gui, -AlwaysOnTop
- return
- UpDate1:
- Gui, Submit, NoHide
- return
- Start_Clicker1:
- Run_Auto_Clicker1()
- return
- Stop_Auto_Clicker1:
- Stop_Clicking1 := 1
- return
- Hint1:
- msgbox,,Hint 1, Select Yes to turn the auto clicker on`n
- ,`nTurning the auto clicker on does not make the clicker start clicking,`nbut this allows that to be a option`n
- ,`nThis was added because there is/was plans to add more features to this auto clicker at a later date
- return
- Hint2:
- msgbox,,Hint 2, Most windows, tabs, etc have a hidden ID.
- ,`n`nBy turning this on you are making it so that the auto clicker
- ,`nwill only click the page you want it to so you don't have to worry that the
- ,`nclicker clicks something you don't want it to
- .`n`n To use this, Click the "Get Control ID" Button
- .`nAfter you have clicked the button a tooltip will show up
- .`nNow click on the surface you want to get the id from
- ,`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
- .`n`n`n`n*Note, After you select the get "Get Control ID" Button
- ,`nthe very next time you press the left mouse button
- ,`n you will be setting your Control ID.
- return
- Hint3:
- msgbox,,Hint 3, This is the Control ID that you get from pressing the "Get Control ID" `n one line above this one
- .`n`n Note that you can set a default by changing the Control ID Global variable in the script
- return
- Hint4:
- msgbox,,Hint 4, This sets the size of an imaginary box that surrounds the place you select to click
- .`n`n By moving your mouse in or out of this box will start or stop the auto clicker
- .`n`nThis only comes into effect once you have started the auto clicker and then moved your mouse for the first time
- .`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
- .`n`nA somewhat small box is suggested (20 x 20 y) but a larger box is fine.
- return
- Hint5:
- msgbox,,Hint 5, This sets where you want the auto clicker to click
- .`n`n`nTo set this point, press the "Get X And Y" Button
- .`n`n`nNext, move your mouse to where you want the auto clicker to click
- .`n`nNext, Click the left mouse button to lock that position
- .`n`nThe value of the x and y will show up in the edit field
- .`n`n`nYou can set a default location by changing the X1_Pos and Y1_Pos variables in the script
- .`n`n`n`n*Note, After you select the get x and y button
- ,`nthe very next time you press the left mouse button
- ,`n you will be setting your x and y.
- return
- Hint6:
- msgbox,,Hint 6, This is how you select how fast you want your auto clicker to click
- .`n`n The values are
- .`nSlow is a 10 second delay between clicks
- .`nMed is a 1 second delay between clicks
- .`nFast is a 30 ms delay between clicks
- .`n`nYou can change the delay for each by finding the "Clicker1_Delay()" `nFunction at the bottom of the script.
- return
- Hint7:
- msgbox,,Hint 7, This allows you to set the auto clicker to "Shift Click"
- .`n`nEach time the auto clicker clicks, it will hold down the shift button
- .`n`n*Note, the first click after you start the auto clicker may not act as a shift click*
- return
- Hint8:
- msgbox,,Hint 8, Here are three Buttons
- .`n`nThe update button, updates the values you have set in the gui
- .`nFor most of the values, you must press the update button for them to take effect
- .`n`nThe Start button starts the script for the first time
- .`n`nThe Stop button stops the auto clicker from clicking.
- return
- Get_control_ID()
- {
- isPressed := 0
- ;Sleep, 1000
- Loop
- {
- MouseGetPos,,,,The_ID
- tooltip,%The_ID%
- GetKeyState, Mouse_State, LButton
- Mouse_State := GetKeyState("LButton")
- ;tooltip,%Mouse_State%
- if(Mouse_State==0)
- {
- isPressed := 1
- }
- if(isPressed==1)
- {
- if(Mouse_State==1)
- {
- Temp_Control_ID := The_ID
- isPressed := 0
- ToolTip
- break
- }
- }
- }
- }
- Get_Click_Location()
- {
- isPressed := 0
- ;Sleep, 1000
- Loop
- {
- MouseGetPos,The_X_Pos,The_Y_Pos
- tooltip,%The_X_Pos% %The_Y_Pos%
- GetKeyState, Mouse_State, LButton
- Mouse_State := GetKeyState("LButton")
- ;tooltip,%Mouse_State%
- if(Mouse_State==0)
- {
- isPressed := 1
- }
- if(isPressed==1)
- {
- if(Mouse_State==1)
- {
- Temp_X_Pos := The_X_Pos
- Temp_Y_Pos := The_Y_Pos
- isPressed := 0
- ToolTip
- break
- }
- }
- }
- }
- Run_Auto_Clicker1()
- {
- zone1_x_size := Size_Of_X1//2
- zone1_y_size := Size_Of_Y1//2
- isPaused1 := 0
- if(Clicker_1_On==True)
- {
- Loop
- {
- if(isPaused1==0)
- {
- if(Stop_Clicking1==1)
- {
- break
- }
- if(Shift1_Yes==True)
- {
- send, {shift down}
- }
- Click, %X_Pos1% %Y_Pos1%
- if(Shift1_Yes==True)
- {
- send, {shift up}
- }
- ;i++
- ;tooltip, %i%
- MouseGetPos,X1, Y1
- if(X1!=X_Pos1||Y1!=Y_Pos1)
- {
- isPaused1:=1
- ;Sleep, 500
- }
- Clicker1_Delay()
- }
- if(isPaused1==1)
- {
- if(Use_ID_1_Yes==True)
- {
- MouseGetPos, X1, Y1,,ctrl
- 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))
- {
- isPaused1 := 0
- }
- if(Stop_Clicking1==1)
- {
- break
- }
- }
- else
- {
- MouseGetPos, X1, Y1
- 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))
- {
- isPaused1 := 0
- }
- if(Stop_Clicking1==1)
- {
- break
- }
- }
- }
- }
- }
- Stop_Clicking1 := 0
- }
- Clicker1_Delay()
- {
- if(Speed1_Slow==True)
- Sleep, 10000
- if(Speed1_Med==True)
- Sleep, 1000
- if(Speed1_Fast==True)
- Sleep, 30
- }
- ^z::Pause
- ^x::ExitApp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement