Advertisement
Guest User

SCv1.1.2 Release Version

a guest
Jun 18th, 2018
227
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
  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] " Backgroundaa0000"
  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,"aa0000","aa0000","151515","661515","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,"aa0000","aa0000","151515","440000","aa0000","Smart Clicker v1.1.2",3),pButton[3]:=New Progress_Button(1,3,"Min_Window",313,5,12,12,"aa0000","aa0000","151515","661515","aa0000","_",-7),pButton[4]:=New Progress_Button(1,4,"GuiClose",331,5,12,12,"aa0000","aa0000","151515","661515","aa0000","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] " Backgroundaa0000"
  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","aa0000","151515","252525","292929","Start",11),pButton[6]:=New Progress_Button(2,6,"Stop_Auto_Clicker",170,165,150,45,"Black","aa0000","151515","252525","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] " Backgroundaa0000"
  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","aa0000","444444","050505","120000","Main",6,1),pTab1[2]:=New Progress_Tab1(3,"Window_Tab","Swap_Tabs",0,"Group1",83,5,70,35,"Black","aa0000","444444","050505","120000","Window",6,1),pTab1[3]:=New Progress_Tab1(3,"Position_Tab","Swap_Tabs",0,"Group1",158,5,70,35,"Black","aa0000","444444","050505","120000","Position",6,1),pTab1[4]:=New Progress_Tab1(3,"Speed_Tab","Swap_Tabs",0,"Group1",233,5,70,35,"Black","aa0000","444444","050505","120000","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] " Backgroundaa0000"
  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","aa0000","444444","     AlwaysOnTop      ",1,0),pCheckBox[2]:=New Progress_CheckBox(4,"Use_Target_Window","Submit_All",1,10,60,122,7,-123,8,"555555","444444","aa0000","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","aa0000","151515","252525","000000","FAQ",5),pButton[8]:=New Progress_Button(4,8,"Get_More_Auto_Clickers",170,50,130,40,"Black","aa0000","151515","252525","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] " Backgroundaa0000"
  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","aa0000","151515","252525","222222","Set Window",8),pButton[10]:=New Progress_Button(5,10,"Update_Window",175,15,115,35,"Black","aa0000","151515","252525","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] " Backgroundaa0000"
  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] " Backgroundaa0000"
  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","aa0000","151515","252525","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] " Backgroundaa0000"
  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] " Backgroundaa0000"
  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] " Backgroundaa0000"
  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","aa0000","151515","252525","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] " Backgroundaa0000"
  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","aa0000","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","aa0000","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] " Backgroundaa0000"
  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
  145.         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.     Gui,6:Submit,NoHide
  354.     Gui,7:Submit,NoHide
  355.     Stop:=1
  356.     return
  357. Set_Window:
  358.     if(!pButton[A_GuiControl].Button_Press())
  359.         return
  360.     Stop:=1,Target_Window:=Set_Window()
  361.     return
  362. Get_More_Auto_Clickers:
  363.     if(!pButton[A_GuiControl].Button_Press())
  364.         return
  365.     Stop:=1
  366.     Try{
  367.         run,https://www.youtube.com/playlist?list=PLPI5C2_hIGGw7poIqgox3rDnyocwTxcY_
  368.     }
  369.     return
  370. Move_Window:
  371.     PostMessage,0xA1,2
  372.     while(Getkeystate("LButton"))
  373.         SetTimer,Watch_Hover,off
  374.     SetTimer,Watch_Hover,10
  375.     return
  376. Min_Window:
  377.     Gui,1:Minimize
  378.     return
  379. Always_On_Top:
  380.     Get_Name(A_GuiControl)
  381.     if(pCheckbox[1].is_on=1)
  382.         Gui,1:+AlwaysOnTop
  383.     else
  384.         Gui,1:-AlwaysOnTop
  385.     return
  386. Swap_Tabs:
  387.     Swap_Tab1_State(A_GuiControl),Switch_Tabs(A_GuiControl)
  388.     return
  389. Start_Auto_Clicker:
  390.     if(!pButton[A_GuiControl].Button_Press())
  391.         return
  392.     Run_Auto_Clicker()
  393.     return
  394. Stop_Auto_Clicker:
  395.     if(!pButton[A_GuiControl].Button_Press())
  396.         return
  397.     Stop:=1
  398.     return
  399. Set_Position:
  400.     if(!pButton[A_GuiControl].Button_Press())
  401.         return
  402.     Stop:=1,Set_Click_Position()
  403.     return
  404. Preview_Position:
  405.     if(!pButton[A_GuiControl].Button_Press())
  406.         return
  407.     Stop:=1
  408.     if(Target_X!=null)
  409.         Show_Preview_Box()
  410.     else
  411.         Show_Message("1")
  412.     return
  413. Show_Preview_Box(){
  414.     x1:=Target_X-(Box_Width//2),y1:=Target_Y-(Box_Height//2)
  415.     Gui,1:Minimize
  416.     Gui,8:Destroy
  417.     Gui,8:+AlwaysOnTop -Caption Border +LastFound
  418.     Gui,8:Color,00FF00
  419.     WinSet,Transparent,100
  420.     Gui,8:Show,x%x1% y%y1% w%Box_Width% h%Box_Height%
  421.     sleep,2000
  422.     Gui,1:Show
  423.     Gui,8:Destroy
  424. }
  425. Switch_Tabs(ctrl){
  426.     SetBatchLines,-1
  427.     Loop 4  {
  428.         if(pTab1[A_Index].Name=ctrl)
  429.             Gui,% A_Index + 3 ":Show",x5 y55 w320 h105
  430.         else
  431.             Gui,% A_Index + 3 ":Hide"
  432.     }
  433.     if(!Turbo_Mode)
  434.         SetBatchLines,10ms 
  435. }
  436. Set_Click_Position(){
  437.     While(!GetKeyState("LButton"))
  438.         ToolTip,Click to set
  439.     Tooltip,
  440.     MouseGetPos,tx,ty
  441.     Target_X:=tx,Target_Y:=ty
  442.     GuiControl,6:,Position,% "x:"tx "   y:" ty
  443. }
  444. Show_Message(Message_Number)  {
  445.     Gui,1:+OwnDialogs
  446.     if(Message_Number=1)
  447.         msgbox,,Dumbass Alert!!!!,You need to set a click location before you can preview where you are going to click!
  448.     else if(Message_Number=2)
  449.         msgbox,48,Missing Info!,You need to select a click position before you can start the auto clicker.
  450.     else if(Message_Number=3)
  451.         msgbox,48,Missing Info!,You need to select a target window.
  452.     else if(Message_Number=4)
  453.         msgbox,48,Missing Info!,Something is wrong with the box size.`nMake sure that the box size is greater than 4x4px
  454.             .`nvalues under 20x20px should not be used.
  455.     else if(Message_Number=5)                          
  456.         MsgBox, 64, FAQ, Smart Clicker v1.1 By Hellbent aka CivReborn`n`nForget How To Set Up?`nVisit CivReborn On YouTube for setup video
  457.             .`n`nHotkeys:`nThis is a auto pause auto clicker and has no need for most hotkeys
  458.             .`nHowever`, you can exit this program at any time by pressing`nctrl+shift+alt+ESC                     
  459. }
  460. Set_Window(){
  461.     i:=0
  462.     Loop    {
  463.         ToolTip,Click on the target window twice to lock it.
  464.         if(!GetkeyState("LButton")&&!isPressed)
  465.             isPressed:=1
  466.         else if(GetkeyState("LButton")&&isPressed=1){
  467.             i++,isPressed:=0
  468.             if(i>=2){
  469.                 WinGetTitle,Target,A
  470.                 ToolTip,
  471.                 break
  472.             }
  473.         }
  474.     }
  475.     GuiControl,5:,Target_Window,% Target
  476.     return Target  
  477. }
  478. Run_Auto_Clicker(){
  479.     global
  480.     Stop:=0
  481.     if(Target_X=null){
  482.         Show_Message("2")
  483.         return
  484.     }
  485.     if(Target_Window=null&&Use_Target_Window=1){
  486.         Show_Message("3")
  487.         return
  488.     }
  489.     if(Box_Width<=4||Box_Height<=4||Box_Width=null||Box_Height=null){
  490.         Show_Message("4")
  491.         return
  492.     }
  493.     if(Turbo_Mode=1)
  494.         SetBatchLines,-1
  495.     else
  496.         SetBatchLines,10ms
  497.     While(Stop=0){
  498.         if(Use_Target_Window=1){
  499.             If WinActive(Target_Window)
  500.                 Click_Function()
  501.         }else if(Use_Target_Window=0)
  502.             Click_Function()
  503.     }  
  504. }
  505. Click_Function(){
  506.     t8:=Box_Width//2,t9:=Box_Height//2
  507.     MouseGetPos,tx,ty
  508.     if(tx>=(Target_X-t8)&&tx<=(Target_X+t8)&&ty>=(Target_Y-t9)&&ty<=(Target_Y+t9)){
  509.         Click, %Target_X% %Target_Y%
  510.         if(Use_Click_Delay)
  511.             sleep, %Click_Delay%
  512.     }
  513. }
  514. pButton_StartUp(){
  515.     SetTimer,Watch_Hover,10
  516. }  
  517. Watch_Hover(){
  518.     global
  519.     if(Press_active=0){
  520.         if(Hover_On=0){
  521.             MouseGetPos,,,,ctrl,2
  522.             loop,% pButton.Length() {
  523.                 GuiControlGet,cName,% pButton[A_Index].Window_Name ":Name",% ctrl
  524.                 cut:=Strlen(cName)
  525.                 StringLeft,bName,cName,cut-2
  526.                 if(bname=pButton[A_Index].Button_Name){
  527.                     pButton[A_Index].Button_Hover_On()
  528.                     Hover_On:=1,Active_Button:=bname,win:=pButton[A_Index].Window_Name
  529.                     return
  530.                 }  
  531.             }
  532.         }else if(Hover_On=1){
  533.             MouseGetPos,,,,ctrl,2
  534.             GuiControlGet,cName,%win%:Name,% ctrl
  535.             cut:=Strlen(cName)
  536.             StringLeft,nBName,cName,cut-2
  537.             if(NbName!=Active_Button){
  538.                 pButton[Active_Button].Button_Hover_Off()
  539.                     Hover_On:=0,Active_Button:=""
  540.             }
  541.         }
  542.     }          
  543. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement