Advertisement
Guest User

SCv1.1.3

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