Advertisement
Guest User

Smart Clicker v1.1.3

a guest
Jun 20th, 2018
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*  Smart Clicker v1.1.2
  2.     Written By: Hellbent aka CivReborn
  3.     YouTube Page: https://www.youtube.com/user/CivReborn
  4.     Written For: The CivReborn Youtube Channel. All rights reserved
  5.     Notice: Do not distribute this script without prior written consent by the author (Hellbent aka CivReborn)
  6.     Date Started: June 19th, 2018
  7.     Date Of Last Edit: June 19th, 2018
  8.     Last Paste:
  9. */
  10. #SingleInstance,Force
  11. CoordMode,Mouse,Screen
  12. SetBatchLines,10ms
  13. SetMouseDelay,-1
  14. SetTitleMatchMode,2
  15. ;~ SetMouseDelay,60    ;<----- uncomment this line if this clicks to fast for the app you are trying to click.
  16. pButton_StartUp()
  17. global Press_active:=0,Hover_On:=0,Active_Button,pButton:={},pTab1:={},pCheckBox:={},pRadio:={},Use_Target_Window:=1,Stop:=0,Target_X:=null,Target_Y:=null,Target_Window:=null,Box_Width:=80,Box_Height:=80,Click_Delay:=0,Turbo_Mode:=0,Use_Click_Delay:=1,Trim_Colour_Var:="00ff00",Tab_Background_Color:="111111",Caption_Buttons_Hover_Color:="114411",Button_Hover_Colour:="252525"
  18. MainBorder:=[0,0,2,250,0,0,350,2,0,248,350,2,348,0,2,250],MainInnerBorder:=[0,0,1,215,0,0,330,1,0,214,330,1,329,0,1,215],TabBorder:=[0,0,310,1,0,0,1,45,0,44,310,1,309,0,1,45],TBorder:=[0,0,320,1,0,0,1,105,0,104,320,1,319,0,1,105],E1Border:=[9,63,303,1,9,63,1,17,9,80,303,1,311,63,1,17],E2Border:=[189,16,87,1,189,34,87,1,189,16,1,18,276,16,1,19],E3Border:=[104,52,62,1,104,70,62,1,104,52,1,18,165,52,1,19],E4Border:=[104,77,62,1,104,95,62,1,104,77,1,18,165,77,1,19],E5Border:=[119,61,102,1,119,79,102,1,119,61,1,18,221,61,1,19]
  19. Gui,1:+AlwaysOnTop -DPIScale -Caption
  20. Gui,1:Color,Black
  21. i:=1
  22. Loop 4  {
  23.     Gui,1:Add,Progress,% "x" MainBorder[i] " y"MainBorder[i+1] " w" MainBorder[i+2] " h" MainBorder[i+3] " Background" Trim_Colour_Var
  24.     i+=4
  25. }
  26. Gui,1:Font,caaaaaa s8 Bold Q5,Segoe UI
  27. pButton[1]:=New Progress_Button(1,1,"Tag",7,5,20,20,Trim_Colour_Var,Trim_Colour_Var,"151515",Caption_Buttons_Hover_Color,"111111","HB",3)
  28. Gui,1:Font,caaaaaa s9 Bold Q5,Segoe UI
  29. pButton[2]:=New Progress_Button(1,2,"Move_Window",60,5,230,20,Trim_Colour_Var,Trim_Colour_Var,"151515",Caption_Buttons_Hover_Color,Trim_Colour_Var,"Smart Clicker v1.1.3",3),pButton[3]:=New Progress_Button(1,3,"Min_Window",313,5,12,12,Trim_Colour_Var,Trim_Colour_Var,"151515",Caption_Buttons_Hover_Color,Trim_Colour_Var,"_",-7),pButton[4]:=New Progress_Button(1,4,"GuiClose",331,5,12,12,Trim_Colour_Var,Trim_Colour_Var,"151515","ff0000",Trim_Colour_Var,"x",-3)
  30. Gui,2:+Parent1 -Caption -DPIScale
  31. Gui,2:Color,111111 ;282828
  32. i:=1
  33. Loop 4  {
  34.     Gui,2:Add,Progress,% "x" MainInnerBorder[i] " y" MainInnerBorder[i+1] " w" MainInnerBorder[i+2] " h" MainInnerBorder[i+3] " Background" Trim_Colour_Var
  35.     i+=4
  36. }
  37. Gui,2:Font,caaaaaa s12 Bold Q5,Segoe UI
  38. pButton[5]:=New Progress_Button(2,5,"Start_Auto_Clicker",10,165,150,45,"Black",Trim_Colour_Var,"151515",Button_Hover_Colour,"292929","Start",11),pButton[6]:=New Progress_Button(2,6,"Stop_Auto_Clicker",170,165,150,45,"Black",Trim_Colour_Var,"151515",Button_Hover_Colour,"292929","Stop",11)
  39. Gui,3:+Parent2 -Caption -DPIScale
  40. Gui,3:Color,191919
  41. i:=1
  42. Loop 4  {
  43.     Gui,3:Add,Progress,% "x" TabBorder[i] " y" TabBorder[i+1] " w" TabBorder[i+2] " h" TabBorder[i+3] " Background" Trim_Colour_Var
  44.     i+=4
  45. }
  46. Gui,3:Font,caaaaaa s10 Bold Q5,Segoe UI
  47. pTab1[1]:=New Progress_Tab1(3,"Main_Tab","Swap_Tabs",1,"Group1",8,5,70,35,"Black",Trim_Colour_Var,"444444","050505",Tab_Background_Color,"Main",6,1),pTab1[2]:=New Progress_Tab1(3,"Window_Tab","Swap_Tabs",0,"Group1",83,5,70,35,"Black",Trim_Colour_Var,"444444","050505",Tab_Background_Color,"Window",6,1),pTab1[3]:=New Progress_Tab1(3,"Position_Tab","Swap_Tabs",0,"Group1",158,5,70,35,"Black",Trim_Colour_Var,"444444","050505",Tab_Background_Color,"Position",6,1),pTab1[4]:=New Progress_Tab1(3,"Speed_Tab","Swap_Tabs",0,"Group1",233,5,70,35,"Black",Trim_Colour_Var,"444444","050505",Tab_Background_Color,"Speed",6,1)
  48. Gui,4:+Parent2 -Caption -DPIScale
  49. Gui,4:Color,191919
  50. i:=1
  51. Loop 4  {
  52.     Gui,4:Add,Progress,% "x" TBorder[i] " y" TBorder[i+1] " w" TBorder[i+2] " h" TBorder[i+3] " Background" Trim_Colour_Var
  53.     i+=4
  54. }
  55. Gui,4:Font,caaaaaa s10  Q5,Segoe UI
  56. pCheckBox[1]:=New Progress_CheckBox(4,"Always","Always_On_Top",1,10,20,122,7,-120,8,"555555","444444",Trim_Colour_Var,"444444","     AlwaysOnTop      ",1,0),pCheckBox[2]:=New Progress_CheckBox(4,"Use_Target_Window","Submit_All",1,10,60,122,7,-123,8,"555555","444444",Trim_Colour_Var,"444444"," Use Target Window      ",1,0)
  57. GuiControl,4:-Backgroundtrans,pCheckbox[1].Checkbox_ID4
  58. GuiControl,4:-Backgroundtrans,pCheckbox[2].Checkbox_ID4
  59. Gui,4:Font,caaaaaa s10 bold Q5,Segoe UI
  60. pButton[7]:=New Progress_Button(4,7,"FAQ",185,12,100,30,"Black",Trim_Colour_Var,"151515",Button_Hover_Colour,"000000","FAQ",5),pButton[8]:=New Progress_Button(4,8,"Get_More_Auto_Clickers",170,50,130,40,"Black",Trim_Colour_Var,"151515",Button_Hover_Colour,"000000","More Auto Clickers",10)
  61. Gui,5:+Parent2 -Caption -DPIScale
  62. Gui,5:Color,191919,111111
  63. i:=1
  64. Loop 4  {
  65.     Gui,5:Add,Progress,% "x" TBorder[i] " y" TBorder[i+1] " w" TBorder[i+2] " h" TBorder[i+3] " Background" Trim_Colour_Var
  66.     i+=4
  67. }
  68. Gui,5:Font,caaaaaa s10 Bold  Q5,Segoe UI
  69. pButton[9]:=New Progress_Button(5,9,"Set_Window",30,15,115,35,"Black",Trim_Colour_Var,"151515",Button_Hover_Colour,"222222","Set Window",8),pButton[10]:=New Progress_Button(5,10,"Update_Window",175,15,115,35,"Black",Trim_Colour_Var,"151515",Button_Hover_Colour,"222222","Update",8)
  70. Gui,5:Font,caaaaaa s8 Q5,Segoe UI
  71. Gui,5:Add,Edit,x10 y64 w300 h15 -E0x200 Center vTarget_Window
  72. i:=1
  73. Loop,4  {
  74.     Gui,5:Add,Progress,% "x" E1Border[i] " y" E1Border[i+1] " w" E1Border[i+2] " h" E1Border[i+3] " Background" Trim_Colour_Var
  75.     i+=4
  76. }
  77. Gui,6:+Parent2 -Caption -DPIScale
  78. Gui,6:Color,191919,111111
  79. i:=1
  80. Loop 4  {
  81.     Gui,6:Add,Progress,% "x" TBorder[i] " y" TBorder[i+1] " w" TBorder[i+2] " h" TBorder[i+3] " Background" Trim_Colour_Var
  82.     i+=4
  83. }
  84. Gui,6:Font,caaaaaa s10 Bold  Q5,Segoe UI
  85. pButton[11]:=New Progress_Button(6,11,"Set_Position",50,10,115,30,"Black",Trim_Colour_Var,"151515",Button_Hover_Colour,"222222","Set Position",6)
  86. Gui,6:Font,caaaaaa s8 Q5,Segoe UI
  87. Gui,6:Add,Edit,x190 y17 w85 h16 -E0x200 Center  vPosition,
  88. i:=1
  89. Loop,4  {  
  90.     Gui,6:Add,Progress,% "x" E2Border[i] " y" E2Border[i+1] " w" E2Border[i+2] " h" E2Border[i+3] " Background" Trim_Colour_Var
  91.     i+=4   
  92. }
  93. Gui,6:Font,caaaaaa s10 Bold Q5,Segoe UI
  94. Gui,6:Add,Text,x10 y52 ,Box Width:
  95. Gui,6:Add,Text,x10 y77 ,Box Height:
  96. Gui,6:Font,caaaaaa s8 Q5,Segoe UI
  97. Gui,6:Add,Edit,x105 y53 w60 h16 Number -E0x200 Center vBox_Width gSubmit_All,80
  98. i:=1
  99. Loop,4  {  
  100.     Gui,6:Add,Progress,% "x" E3Border[i] " y" E3Border[i+1] " w" E3Border[i+2] " h" E3Border[i+3] " Background" Trim_Colour_Var
  101.     i+=4   
  102. }
  103. Gui,6:Add,Edit,x105 y78 w60 h16 Number -E0x200 Center vBox_Height gSubmit_All,80
  104. i:=1
  105. Loop,4  {  
  106.     Gui,6:Add,Progress,% "x" E4Border[i] " y" E4Border[i+1] " w" E4Border[i+2] " h" E4Border[i+3] " Background" Trim_Colour_Var
  107.     i+=4   
  108. }
  109. Gui,6:Font,caaaaaa s10 Bold  Q5,Segoe UI
  110. pButton[12]:=New Progress_Button(6,12,"Preview_Position",185,52,115,45,"Black",Trim_Colour_Var,"151515",Button_Hover_Colour,"222222","Preview",12)
  111. Gui,7:+Parent2 -Caption -DPIScale
  112. Gui,7:Color,191919,111111
  113. i:=1
  114. Loop 4  {
  115.     Gui,7:Add,Progress,% "x" TBorder[i] " y" TBorder[i+1] " w" TBorder[i+2] " h" TBorder[i+3] " Background" Trim_Colour_Var
  116.     i+=4
  117. }
  118. Gui,7:Font,caaaaaa s10 norm Q5,Segoe UI
  119. pCheckBox[3]:=New Progress_CheckBox(7,"Use_Click_Delay","Submit_All",1,10,15,122,7,-123,8,"555555","444444",Trim_Colour_Var,"444444","   Use Click Delay     ",1,0),pCheckBox[4]:=New Progress_CheckBox(7,"Turbo_Mode","Submit_All",0,186,15,122,7,-123,8,"555555","444444",Trim_Colour_Var,"444444","       Turbo Mode ",1,0)
  120. GuiControl,7:-Backgroundtrans,pCheckbox[3].Checkbox_ID4
  121. GuiControl,7:-Backgroundtrans,pCheckbox[4].Checkbox_ID4
  122. Gui,7:Font,caaaaaa s10 Bold Q5,Segoe UI
  123. Gui,7:Add,Text,x30 y60 ,Click Delay:
  124. Gui,7:Font,caaaaaa s8 Bold Q5,Segoe UI
  125. Gui,7:Add,Edit,x120 y62 w100 h16 Number -E0x200 Center vClick_Delay gSubmit_All, 0
  126. i:=1
  127. Loop,4  {  
  128.     Gui,7:Add,Progress,% "x" E5Border[i] " y" E5Border[i+1] " w" E5Border[i+2] " h" E5Border[i+3] " Background" Trim_Colour_Var
  129.     i+=4   
  130. }
  131. Gui,7:Font,caaaaaa s10 Bold Q5,Segoe UI
  132. Gui,7:Add,Text,x230 y60 ,( ms )
  133. Gui,4:Show,x5 y55 w320 h105
  134. Gui,3:Show,x10 y5 w310 h45
  135. Gui,2:Show,x10 y30 w330 h215
  136. Gui,1:Show,w350 h250,Smart Clicker v1.1.2
  137. gosub,Submit_All
  138. return
  139. GuiClose:
  140. *^!+ESC::
  141.     ExitApp
  142. Class Progress_Button   {
  143.     __New(Window_Name,Button_Name,Label,x,y,w,h,BC,TRC,TC1,TC2,TC3,Button_Text,Text_Offset:=0){
  144.         This.Text_Offset:=Text_Offset,This.Window_Name:=Window_Name,This.Button_Name:=Button_Name,This.Label:=Label,This.Button_ID1:=Button_Name "_1",This.Button_ID2:=Button_Name "_2"
  145.         This.Button_ID3:=Button_Name "_3",This.Button_ID4:=Button_Name "_4",This.Button_Text:=Button_Text,This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.Bottom_Color:=BC,This.Trim_Color:=TRC,This.Top_Color_1:=TC1,This.Top_Color_2:=TC2,This.Top_Color_3:=TC3,This.Add_Button()
  146.     }
  147.     Add_Button(){
  148.         global
  149.         Gui,% This.Window_Name ":Add",Text,% "x" This.X " y" This.Y " w" This.W " h" This.H " v" This.Button_Name " g" This.Label
  150.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X " y" This.Y " w" This.W " h" This.H " Background" This.Bottom_Color " v" This.Button_ID1
  151.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X " y" This.Y " w" This.W-1 " h" This.H-1 " Background" This.Trim_Color " v" This.Button_ID2
  152.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X+1 " y" This.Y+1 " w" This.W-2 " h" This.H-2 " Background" This.Top_Color_1 " v" This.Button_ID3
  153.         Gui,% This.Window_Name ":Add",Text,% "x" This.X+1 " y" This.Y+This.Text_Offset " w" This.W-2 " r1 Center BackgroundTrans v" This.Button_ID4,% This.Button_Text
  154.     }
  155.     Button_Press(){
  156.         global
  157.         Press_Active:=1
  158.         GuiControl,% This.Window_Name ":Move",% This.Button_ID4,% "x" This.X+1 " y" This.Y+1+This.Text_Offset
  159.         sleep,-1
  160.         GuiControl,% This.Window_Name ":Hide",This.Button_ID2
  161.         GuiControl,% This.Window_Name ":+Background" This.Top_Color_3,% This.Button_ID3
  162.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID1
  163.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID3
  164.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID4
  165.         While(GetKeyState("LButton"))
  166.             Sleep, 10
  167.         MouseGetPos,,,,ctrl,2
  168.         GuiControlGet,cName,% win ":Name",% ctrl
  169.         cut:=Strlen(cName)
  170.         StringLeft,bName,cName,cut-2
  171.         if(bname=This.Button_Name){
  172.             GuiControl,% This.Window_Name ":Show",This.Button_ID2
  173.             GuiControl,% This.Window_Name ":+Background" This.Top_Color_1,% This.Button_ID3
  174.             GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID1
  175.             GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID2
  176.             GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID3
  177.             GuiControl,% This.Window_Name ":Move",% This.Button_ID4,% "x" This.X " y" This.Y+This.Text_Offset
  178.             GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID4
  179.             %bName%.Button_Hover_On()
  180.             Hover_On:=0,Active_Button:=bname,Press_Active:=0
  181.             sleep,10
  182.             return true
  183.         }
  184.         GuiControl,% This.Window_Name ":Show",This.Button_ID2
  185.         GuiControl,% This.Window_Name ":Move",% This.Button_ID4,% "x" This.X " y" This.Y+This.Text_Offset
  186.         GuiControl,% This.Window_Name ":+Background" This.Top_Color_1,% This.Button_ID3
  187.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID1
  188.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID2
  189.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID3
  190.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID4
  191.         Hover_On:=0,Press_Active:=0
  192.         sleep,10
  193.         return False
  194.     }
  195.     Button_Hover_On(){
  196.         global
  197.         GuiControl,% This.Window_Name ":+Background" This.Top_Color_2,% This.Button_ID3
  198.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID4
  199.     }
  200.     Button_Hover_Off(){
  201.         global
  202.         GuiControl,% This.Window_Name ":+Background" This.Top_Color_1,% This.Button_ID3
  203.         GuiControl,% This.Window_Name ":+Redraw",% This.Button_ID4
  204.     }
  205. }  
  206. Get_Name(Name){
  207.     global
  208.     Loop, % pCheckBox.Length()
  209.         if(Name=pCheckBox[A_Index].Name||Name=pCheckBox[A_Index].Checkbox_ID4){
  210.             pCheckBox[A_Index].UpDate_CheckBox()
  211.             break
  212.         }
  213. }
  214. Class Progress_CheckBox {
  215.     __New(Window_Name,Checkbox_Name,Label,Start_State,x,y,w,h,Text_X_Offset,Text_Y_Offset,Outer_Color,Inner_Color,Check_On_Colour,Check_Off_Colour,Check_Box_Text,Outer_Thickness:=1,Inner_Thickness:=1){
  216.         This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.Text_X_Offset:=Text_X_Offset,This.Text_Y_Offset:=Text_Y_Offset,This.Outer_Thickness:=Outer_Thickness,This.Inner_Thickness:=Inner_Thickness,This.Outer_Trim_Colour:=Outer_Color,This.Inner_Trim_Colour:=Inner_Color
  217.         This.Check_On_Colour:=Check_On_Colour,This.Check_Off_Colour:=Check_Off_Colour,This.Name:=Checkbox_Name,This.Checkbox_ID1:=This.Name "_1",This.Checkbox_ID2:=This.Name "_2",This.Checkbox_ID3:=This.Name "_3",This.Checkbox_ID4:=This.Name "_4",This.Window_Name:=Window_Name,This.Label:=Label
  218.         This.Outer_Trim_Thickness:=Outer_Thickness,This.Inner_Trim_Thickness:=Inner_Thickness,This.Is_On:=Start_State,This.Text:=Check_Box_Text,This.Add_CheckBox()
  219.     }
  220.     Add_CheckBox(){
  221.         global
  222.         Gui,% This.Window_Name ":Add",Text,% "x" This.X " y" This.Y " w" This.W " h" This.H " v" This.Name " g" This.Label
  223.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X " y" This.Y " w" This.W " h" This.H " BackGround" This.Outer_Trim_Colour " v" This.Checkbox_ID1
  224.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X+This.Outer_Thickness " y" This.Y+This.Outer_Thickness " w" This.W-(2*This.Outer_Thickness) " h" This.H-(2*This.Outer_Thickness) " BackGround" This.Inner_Trim_Colour " v" This.Checkbox_ID2
  225.         (This.Is_On=1)?(col:=This.Check_On_Colour):(col:=This.Check_Off_Colour)
  226.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X+This.Outer_Thickness+This.Inner_Thickness " y" This.Y+This.Outer_Thickness+This.Inner_Thickness " w" This.W - ((2*This.Outer_Thickness)+(2*This.Inner_Thickness)) " h" This.H - ((2*This.Outer_Thickness)+(2*This.Inner_Thickness)) " BackGround" col " v" This.Checkbox_ID3
  227.         Gui,% This.Window_Name ":Add",Text,% "x" This.X+This.W+This.Text_X_Offset " y" This.Y+This.Text_Y_Offset " Backgroundtrans v" This.Checkbox_ID4 " g" This.Label,% This.Text
  228.     }
  229.     UpDate_CheckBox(){
  230.         if(This.Is_On:=!This.Is_On){
  231.             GuiControl,% This.Window_Name ":+Background" This.Check_On_Colour,% This.Checkbox_ID3
  232.             GuiControl,% This.Window_Name ":+Redraw",% This.Checkbox_ID4
  233.         }else   {
  234.             GuiControl,% This.Window_Name ":+Background" This.Check_Off_Colour,% This.Checkbox_ID3
  235.             GuiControl,% This.Window_Name ":+Redraw",% This.Checkbox_ID4
  236.         }
  237.     }
  238. }
  239. Swap_Tab1_State(Control)
  240.     {
  241.         Loop, % pTab1.Length()
  242.         if(Control=pTab1[A_Index].Name&&pTab1[A_Index].State!=1){
  243.             pTab1[A_Index].UpDate_Tabs()
  244.             break
  245.         }
  246.     }  
  247. class Progress_Tab1 {
  248.     __New(Window_Name,Name,Label,Starting_State,Group_Name,x,y,w,h,Background_Colour,Trim_Color_1,Trim_Color_2,Top_Color_1,Top_Color_2,Text,Y_Text_Offset:=0,Trim_Size:=2){
  249.         This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.State:=Starting_State,This.Y_Offset:=Y_Text_Offset,This.Name:=Name,This.Group:=Group_Name,This.Window_Name:=Window_Name
  250.         This.Label:=Label,This.Colour1:=Background_Colour,This.Colour2:=Trim_Color_1,This.Colour3:=Trim_Color_2,This.Colour4:=Top_Color_1,This.Colour5:=Top_Color_2
  251.         This.ID1:=This.Name "_1",This.ID2:=This.Name "_2",This.ID3:=This.Name "_3",This.ID4:=This.Name "_4",This.Text:=Text,This.Trim_Size:=Trim_Size,This.Add_Tabs()
  252.     }
  253.     Add_Tabs(){
  254.         global
  255.         Gui,% This.Window_Name ":Add",Text,% "x" This.X " y" This.Y " w" This.W " h" This.H " v" This.Name " g" This.Label
  256.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X " y" This.Y " w" This.W " h" This.H " Background" This.Colour1 " v" This.ID1
  257.         if(This.State=0){
  258.             Gui,% This.Window_Name ":Add",Progress,% "x" This.X " y" This.Y " w" This.W-This.Trim_Size " h" This.H-This.Trim_Size " Background" This.Colour2 " v" This.ID2
  259.             Gui,% This.Window_Name ":Add",Progress,% "x" This.X+This.Trim_Size " y" This.Y+This.Trim_Size " w" This.W-This.Trim_Size*3 " h" This.H-This.Trim_Size*3 " Background" This.Colour4 " v" This.ID3
  260.             Gui,% This.Window_Name ":Add",Text,% "x" This.X+This.Trim_Size " y" This.Y+This.Trim_Size+This.Y_Offset " w" This.W-This.Trim_Size*3 " r1 Center BackgroundTrans v" This.ID4,% This.Text
  261.         }else   {
  262.             GuiControl,% This.Window_Name ":Hide",% This.ID1
  263.             Gui,% This.Window_Name ":Add",Progress,% "x" This.X+This.Trim_Size " y" This.Y+This.Trim_Size " w" This.W-This.Trim_Size " h" This.H-This.Trim_Size " Background" This.Colour3 " v" This.ID2
  264.             Gui,% This.Window_Name ":Add",Progress,% "x" This.X+2*This.Trim_Size " y" This.Y+2*This.Trim_Size " w" This.W-This.Trim_Size*3 " h" This.H-This.Trim_Size*3 " Background" This.Colour5 " v" This.ID3
  265.             Gui,% This.Window_Name ":Add",Text,% "x" This.X+This.Trim_Size*2 " y" This.Y+(This.Trim_Size*2)+This.Y_Offset " w" This.W-This.Trim_Size*3 " r1 Center BackgroundTrans v" This.ID4,% This.Text
  266.         }
  267.     }
  268.     UpDate_Tabs(){
  269.         Loop,% pTab1.Length(){
  270.             if(pTab1[A_Index].State=1&&pTab1[A_Index].Group=This.Group){
  271.                 pTab1[A_Index].State:=0
  272.                 GuiControl,% pTab1[A_Index].Window_Name ":Move",% pTab1[A_Index].ID2,% "x" pTab1[A_Index].X " y" pTab1[A_Index].Y
  273.                 GuiControl,% pTab1[A_Index].Window_Name ":Move",% pTab1[A_Index].ID3,% "x" pTab1[A_Index].X+pTab1[A_Index].Trim_Size " y" pTab1[A_Index].Y+pTab1[A_Index].Trim_Size
  274.                 GuiControl,% pTab1[A_Index].Window_Name ":Move",% pTab1[A_Index].ID4,% "x" pTab1[A_Index].X+pTab1[A_Index].Trim_Size " y" pTab1[A_Index].Y+pTab1[A_Index].Trim_Size+pTab1[A_Index].Y_Offset
  275.                 GuiControl,% pTab1[A_Index].Window_Name ":Show",% pTab1[A_Index].ID1
  276.                 GuiControl,% pTab1[A_Index].Window_Name ":+Background" pTab1[A_Index].Colour2,% pTab1[A_Index].ID2
  277.                 GuiControl,% pTab1[A_Index].Window_Name ":+Background" pTab1[A_Index].Colour4,% pTab1[A_Index].ID3
  278.                 GuiControl,% pTab1[A_Index].Window_Name ":+Redraw",% pTab1[A_Index].ID4
  279.             }
  280.         }
  281.         GuiControl,% This.Window_Name ":Hide",% This.ID1   
  282.         GuiControl,% This.Window_Name ":Move",% This.ID2,% "x" This.X+This.Trim_Size " y" This.Y+This.Trim_Size
  283.         GuiControl,% This.Window_Name ":Move",% This.ID3,% "x" This.X+2*This.Trim_Size " y" This.Y+2*This.Trim_Size
  284.         GuiControl,% This.Window_Name ":Move",% This.ID4,% "x" This.X+This.Trim_Size*2 " y" This.Y+(This.Trim_Size*2)+This.Y_Offset
  285.         GuiControl,% This.Window_Name ":+Background" This.Colour3,% This.ID2   
  286.         GuiControl,% This.Window_Name ":+Background" This.Colour5,% This.ID3
  287.         GuiControl,% This.Window_Name ":+Redraw",% This.ID4
  288.         This.State:=1
  289.     }
  290. }
  291. Swap_Radio_State(Control){
  292.     Loop, % pRadio.Length()
  293.         if((Control=pRadio[A_Index].Name||Control=pRadio[A_Index].Radio_ID4)&&pRadio[A_Index].State!=1){
  294.             pRadio[A_Index].Update_Radio()
  295.             break
  296.         }
  297. }
  298. class Progress_Radio    {
  299.     __New(Window_Name,Radio_Name,Label,Start_State,Group_Name,x,y,w,h,Text_X_Offset,Text_Y_Offset,Outer_Color,Inner_Color,Radio_On_Colour,Radio_Off_Colour,Radio_Text,Outer_Thickness:=1,Inner_Thickness:=1){
  300.         This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.Group:=Group_Name,This.Text_X_Offset:=Text_X_Offset,This.Text_Y_Offset:=Text_Y_Offset
  301.         This.Outer_Thickness:=Outer_Thickness,This.Inner_Thickness:=Inner_Thickness,This.Outer_Trim_Colour:=Outer_Color,This.Inner_Trim_Colour:=Inner_Color
  302.         This.Radio_On_Colour:=Radio_On_Colour,This.Radio_Off_Colour:=Radio_Off_Colour,This.Name:=Radio_Name,This.Radio_ID1:=This.Name "_1",This.Radio_ID2:=This.Name "_2",This.Radio_ID3:=This.Name "_3"
  303.         This.Radio_ID4:=This.Name "_4",This.Window_Name:=Window_Name,This.Label:=Label,This.Outer_Trim_Thickness:=Outer_Thickness,This.Inner_Trim_Thickness:=Inner_Thickness
  304.         This.State:=Start_State,This.Text:=Radio_Text
  305.         This.Add_Radio()
  306.     }
  307.     Add_Radio(){
  308.         global
  309.         Gui,% This.Window_Name ":Add",Text,% "x" This.X " y" This.Y " w" This.W " h" This.H " v" This.Name " g" This.Label
  310.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X " y" This.Y " w" This.W " h" This.H " BackGround" This.Outer_Trim_Colour " v" This.Radio_ID1
  311.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X+This.Outer_Thickness " y" This.Y+This.Outer_Thickness " w" This.W-(2*This.Outer_Thickness) " h" This.H-(2*This.Outer_Thickness) " BackGround" This.Inner_Trim_Colour " v" This.Radio_ID2
  312.         (This.State=1)?(col:=This.Radio_On_Colour):(col:=This.Radio_Off_Colour)
  313.         Gui,% This.Window_Name ":Add",Progress,% "x" This.X+This.Outer_Thickness+This.Inner_Thickness " y" This.Y+This.Outer_Thickness+This.Inner_Thickness " w" This.W - ((2*This.Outer_Thickness)+(2*This.Inner_Thickness)) " h" This.H - ((2*This.Outer_Thickness)+(2*This.Inner_Thickness)) " BackGround" col " v" This.Radio_ID3
  314.         Gui,% This.Window_Name ":Add",Text,% "x" This.X+This.W+This.Text_X_Offset " y" This.Y+This.Text_Y_Offset " Backgroundtrans v" This.Radio_ID4 " g" This.Label,% This.Text
  315.     }
  316.     Update_Radio(){
  317.         Loop,% pRadio.Length()  {
  318.             if(pRadio[A_Index].State=1&&pRadio[A_Index].Group=This.Group){
  319.                 GuiControl,% pRadio[A_Index].Window_Name ":+Background" pRadio[A_Index].Radio_Off_Colour,% pRadio[A_Index].Radio_ID3
  320.                 GuiControl,% pRadio[A_Index].Window_Name ":+Redraw",% pRadio[A_Index].Radio_ID4
  321.                 pRadio[A_Index].State:=0
  322.             }
  323.         }
  324.         GuiControl,% This.Window_Name ":+Background" This.Radio_On_Colour,% This.Radio_ID3
  325.         GuiControl,% This.Window_Name ":+Redraw",% This.Radio_ID4
  326.         This.State:=1
  327.     }
  328. }  
  329. Tag:
  330.     if(!pButton[A_GuiControl].Button_Press())
  331.         return
  332.     Stop:=1
  333.     Try{
  334.         run,https://www.youtube.com/user/CivReborn
  335.     }
  336.     return 
  337. FAQ:
  338.     if(!pButton[A_GuiControl].Button_Press())
  339.         return
  340.     Stop:=1,Show_Message("5")
  341.     return
  342. Update_Window:
  343.     if(!pButton[A_GuiControl].Button_Press())
  344.         return
  345.     Stop:=1
  346.     Gui,5:Submit,NoHide
  347.     return
  348. Submit_All:
  349.     Get_Name(A_GuiControl)
  350.     (pCheckbox[2].Is_On=1)?(Use_Target_Window:=1):(Use_Target_Window:=0)
  351.     (pCheckbox[3].Is_On=1)?(Use_Click_Delay:=1):(Use_Click_Delay:=0)
  352.     (pCheckbox[4].Is_On=1)?(Turbo_Mode:=1):(Turbo_Mode:=0)
  353.     tooltip,% Use_Click_Delay
  354.     Gui,6:Submit,NoHide
  355.     Gui,7:Submit,NoHide
  356.     Stop:=1
  357.     return
  358. Set_Window:
  359.     if(!pButton[A_GuiControl].Button_Press())
  360.         return
  361.     Stop:=1,Target_Window:=Set_Window()
  362.     return
  363. Get_More_Auto_Clickers:
  364.     if(!pButton[A_GuiControl].Button_Press())
  365.         return
  366.     Stop:=1
  367.     Try{
  368.         run,https://www.youtube.com/playlist?list=PLPI5C2_hIGGw7poIqgox3rDnyocwTxcY_
  369.     }
  370.     return
  371. Move_Window:
  372.     PostMessage,0xA1,2
  373.     while(Getkeystate("LButton"))
  374.         SetTimer,Watch_Hover,off
  375.     SetTimer,Watch_Hover,10
  376.     return
  377. Min_Window:
  378.     Gui,1:Minimize
  379.     return
  380. Always_On_Top:
  381.     Get_Name(A_GuiControl)
  382.     if(pCheckbox[1].is_on=1)
  383.         Gui,1:+AlwaysOnTop
  384.     else
  385.         Gui,1:-AlwaysOnTop
  386.     return
  387. Swap_Tabs:
  388.     Swap_Tab1_State(A_GuiControl),Switch_Tabs(A_GuiControl)
  389.     return
  390. Start_Auto_Clicker:
  391.     if(!pButton[A_GuiControl].Button_Press())
  392.         return
  393.     Run_Auto_Clicker()
  394.     return
  395. Stop_Auto_Clicker:
  396.     if(!pButton[A_GuiControl].Button_Press())
  397.         return
  398.     Stop:=1
  399.     return
  400. Set_Position:
  401.     if(!pButton[A_GuiControl].Button_Press())
  402.         return
  403.     Stop:=1,Set_Click_Position()
  404.     return
  405. Preview_Position:
  406.     if(!pButton[A_GuiControl].Button_Press())
  407.         return
  408.     Stop:=1
  409.     if(Target_X!=null)
  410.         Show_Preview_Box()
  411.     else
  412.         Show_Message("1")
  413.     return
  414. Show_Preview_Box(){
  415.     x1:=Target_X-(Box_Width//2),y1:=Target_Y-(Box_Height//2)
  416.     Gui,1:Minimize
  417.     Gui,8:Destroy
  418.     Gui,8:+AlwaysOnTop -Caption Border +LastFound
  419.     Gui,8:Color,00FF00
  420.     WinSet,Transparent,100
  421.     Gui,8:Show,x%x1% y%y1% w%Box_Width% h%Box_Height%
  422.     sleep,2000
  423.     Gui,1:Show
  424.     Gui,8:Destroy
  425. }
  426. Switch_Tabs(ctrl){
  427.     SetBatchLines,-1
  428.     Loop 4  {
  429.         if(pTab1[A_Index].Name=ctrl)
  430.             Gui,% A_Index + 3 ":Show",x5 y55 w320 h105
  431.         else
  432.             Gui,% A_Index + 3 ":Hide"
  433.     }
  434.     if(!Turbo_Mode)
  435.         SetBatchLines,10ms 
  436. }
  437. Set_Click_Position(){
  438.     While(!GetKeyState("LButton"))
  439.         ToolTip,Click to set
  440.     Tooltip,
  441.     MouseGetPos,tx,ty
  442.     Target_X:=tx,Target_Y:=ty
  443.     GuiControl,6:,Position,% "x:"tx "   y:" ty
  444. }
  445. Show_Message(Message_Number)  {
  446.     Gui,1:+OwnDialogs
  447.     if(Message_Number=1)
  448.         msgbox,,Dumbass Alert!!!!,You need to set a click location before you can preview where you are going to click!
  449.     else if(Message_Number=2)
  450.         msgbox,48,Missing Info!,You need to select a click position before you can start the auto clicker.
  451.     else if(Message_Number=3)
  452.         msgbox,48,Missing Info!,You need to select a target window.
  453.     else if(Message_Number=4)
  454.         msgbox,48,Missing Info!,Something is wrong with the box size.`nMake sure that the box size is greater than 4x4px
  455.             .`nvalues under 20x20px should not be used.
  456.     else if(Message_Number=5)                          
  457.         MsgBox, 64, FAQ, Smart Clicker v1.1 By Hellbent aka CivReborn`n`nForget How To Set Up?`nVisit CivReborn On YouTube for setup video
  458.             .`n`nHotkeys:`nThis is a auto pause auto clicker and has no need for most hotkeys
  459.             .`nHowever`, you can exit this program at any time by pressing`nctrl+shift+alt+ESC                     
  460. }
  461. Set_Window(){
  462.     i:=0
  463.     Loop    {
  464.         ToolTip,Click on the target window twice to lock it.
  465.         if(!GetkeyState("LButton")&&!isPressed)
  466.             isPressed:=1
  467.         else if(GetkeyState("LButton")&&isPressed=1){
  468.             i++,isPressed:=0
  469.             if(i>=2){
  470.                 WinGetTitle,Target,A
  471.                 ToolTip,
  472.                 break
  473.             }
  474.         }
  475.     }
  476.     GuiControl,5:,Target_Window,% Target
  477.     return Target  
  478. }
  479. Run_Auto_Clicker(){
  480.     global
  481.     Stop:=0
  482.     if(Target_X=null){
  483.         Show_Message("2")
  484.         return
  485.     }
  486.     if(Target_Window=null&&Use_Target_Window=1){
  487.         Show_Message("3")
  488.         return
  489.     }
  490.     if(Box_Width<=4||Box_Height<=4||Box_Width=null||Box_Height=null){
  491.         Show_Message("4")
  492.         return
  493.     }
  494.     if(Turbo_Mode=1)
  495.         SetBatchLines,-1
  496.     else
  497.         SetBatchLines,10ms
  498.     ToolTip, % Turbo_Mode
  499.     While(Stop=0){
  500.         if(Use_Target_Window=1){
  501.             If WinActive(Target_Window)
  502.                 Click_Function()
  503.         }else if(Use_Target_Window=0)
  504.             Click_Function()
  505.     }  
  506. }
  507. Click_Function(){
  508.     t8:=Box_Width//2,t9:=Box_Height//2
  509.     MouseGetPos,tx,ty
  510.     if(tx>=(Target_X-t8)&&tx<=(Target_X+t8)&&ty>=(Target_Y-t9)&&ty<=(Target_Y+t9)){
  511.         Click, %Target_X% %Target_Y%
  512.         if(Use_Click_Delay)
  513.             sleep, %Click_Delay%
  514.     }
  515. }
  516. pButton_StartUp(){
  517.     SetTimer,Watch_Hover,10
  518. }  
  519. Watch_Hover(){
  520.     global
  521.     if(Press_active=0){
  522.         if(Hover_On=0){
  523.             MouseGetPos,,,,ctrl,2
  524.             loop,% pButton.Length() {
  525.                 GuiControlGet,cName,% pButton[A_Index].Window_Name ":Name",% ctrl
  526.                 cut:=Strlen(cName)
  527.                 StringLeft,bName,cName,cut-2
  528.                 if(bname=pButton[A_Index].Button_Name){
  529.                     pButton[A_Index].Button_Hover_On()
  530.                     Hover_On:=1,Active_Button:=bname,win:=pButton[A_Index].Window_Name
  531.                     return
  532.                 }  
  533.             }
  534.         }else if(Hover_On=1){
  535.             MouseGetPos,,,,ctrl,2
  536.             GuiControlGet,cName,%win%:Name,% ctrl
  537.             cut:=Strlen(cName)
  538.             StringLeft,nBName,cName,cut-2
  539.             if(NbName!=Active_Button){
  540.                 pButton[Active_Button].Button_Hover_Off()
  541.                     Hover_On:=0,Active_Button:=""
  542.             }
  543.         }
  544.     }          
  545. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement