kokozweeb

Ghost clicker v0.1

Jan 28th, 2021 (edited)
1,582
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;Written By: Hellbent aka CivReborn (https://pastebin.com/u/CivReborn)
  2. ;Original pastebin https://pastebin.com/5ESMTdJE
  3.  
  4. #SingleInstance,Force
  5. SetBatchLines, 200ms    ;-1
  6. SetMouseDelay,-1
  7. Coordmode,Mouse,Client
  8. SetTitleMatchMode, 2
  9. SetControlDelay -1
  10. DetectHiddenWindows On
  11.  i:=0,m:=0,j:=0
  12.  Target_Window:=null
  13.  Click_Delay:=0
  14.  Loop_Clicker:=1
  15.  global Stop:=0, Clicker_Is_On:=0
  16.  Gui,+AlwaysOnTop
  17.  
  18.  Gui,Add,Button,x10 y10 w80 h20 gSet_Location,Set Window
  19.  Gui,Add,Edit,x+10 w200 h20 vTarget_Window ,% Target_Window
  20.  Gui,Add,Button,x+10 w80 h20 gUpdate_Window,Update
  21.  
  22.  Gui,Add,Text,x10 ,Click Delay:
  23. Gui,Add,Edit,x+10 w100 h20 vClick_Delay gSubmit_All
  24.  Gui,Add,CheckBox,x+20 vLoop_Clicker gSubmit_All,Loop
  25.  
  26.  
  27.  Gui,Add,Checkbox,x10 w40  vClicker_1 gSubmit_All,#1
  28.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_1,Set Pos
  29.  Gui,Add,Edit,x+10 w70 h17 vPos_1,
  30.  Gui,Add,Text,x+10 ,Number Of Clicks:
  31. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_1 gSubmit_All
  32.  
  33.  Gui,Add,Checkbox,x10 w40 vClicker_2 gSubmit_All,#2
  34.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_2,Set Pos
  35.  Gui,Add,Edit,x+10 w70 h17 vPos_2,
  36.  Gui,Add,Text,x+10 ,Number Of Clicks:
  37. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_2 gSubmit_All
  38.  
  39.  Gui,Add,Checkbox,x10 w40 vClicker_3 gSubmit_All,#3
  40.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_3,Set Pos
  41.  Gui,Add,Edit,x+10 w70 h17 vPos_3,
  42.  Gui,Add,Text,x+10 ,Number Of Clicks:
  43. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_3 gSubmit_All
  44.  
  45.  Gui,Add,Checkbox,x10 w40 vClicker_4 gSubmit_All,#4
  46.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_4,Set Pos
  47.  Gui,Add,Edit,x+10 w70 h17 vPos_4,
  48.  Gui,Add,Text,x+10 ,Number Of Clicks:
  49. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_4 gSubmit_All
  50.  
  51.  Gui,Add,Checkbox,x10 w40 vClicker_5 gSubmit_All,#5
  52.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_5,Set Pos
  53.  Gui,Add,Edit,x+10 w70 h17 vPos_5,
  54.  Gui,Add,Text,x+10 ,Number Of Clicks:
  55. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_5 gSubmit_All
  56.  
  57.  Gui,Add,Checkbox,x10 w40 vClicker_6 gSubmit_All,#6
  58.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_6,Set Pos
  59.  Gui,Add,Edit,x+10 w70 h17 vPos_6,
  60.  Gui,Add,Text,x+10 ,Number Of Clicks:
  61. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_6 gSubmit_All
  62.  
  63.  Gui,Add,Checkbox,x10 w40 vClicker_7 gSubmit_All,#7
  64.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_7,Set Pos
  65.  Gui,Add,Edit,x+10 w70 h17 vPos_7,
  66.  Gui,Add,Text,x+10 ,Number Of Clicks:
  67. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_7 gSubmit_All
  68.  
  69.  Gui,Add,Checkbox,x10 w40 vClicker_8 gSubmit_All,#8
  70.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_8,Set Pos
  71.  Gui,Add,Edit,x+10 w70 h17 vPos_8,
  72.  Gui,Add,Text,x+10 ,Number Of Clicks:
  73. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_8 gSubmit_All
  74.  
  75.  Gui,Add,Checkbox,x10 w40 vClicker_9 gSubmit_All,#9
  76.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_9,Set Pos
  77.  Gui,Add,Edit,x+10 w70 h17 vPos_9,
  78.  Gui,Add,Text,x+10 ,Number Of Clicks:
  79. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_9 gSubmit_All
  80.  
  81.  Gui,Add,Checkbox,x10 w40 vClicker_10 gSubmit_All,#10
  82.  Gui,Add,Button,x+10 w80 h17 gSet_Pos_10,Set Pos
  83.  Gui,Add,Edit,x+10 w70 h17 vPos_10,
  84.  Gui,Add,Text,x+10 ,Number Of Clicks:
  85. Gui,Add,Edit,x+10 w70 h17 number vNo_Clicks_10 gSubmit_All
  86.  
  87.  Gui,Add,Button,x10 w120 h30 gHide_Window, Hide Window
  88.  Gui,Add,Button,x+10 w120 h30 gShow_Window,Show Window
  89.  Gui,Add,Button,x+10 w120 h30 ,
  90.  
  91.  Gui,Add,Button,x10 w120 h30 ,
  92.  Gui,Add,Button,x+10 w120 h30 ,
  93.  Gui,Add,Button,x+10 w120 h30 ,
  94.  
  95.  Gui,Add,Button,x10 w120 h30 gStart_Clicker,Start
  96.  Gui,Add,Button,x+10 w120 h30 gStop_Clicker,Stop
  97.  Gui,Add,Button,x+10 w120 h30 gReload,Reload
  98.  Gui,Add,Text,cRed x10 ,Start = numpad 1
  99.  Gui,Add,Text,cBlue x+10 , Stop = Numpad 2
  100.  Gui,Add,Text,cRed x10 , Hide Window = Numpad 3
  101.  Gui,Add,Text,cBlue x+10 ,Show Window = Numpad 4
  102.  
  103.  
  104.  Gui,Show,w400 h440,Ghost Clicker 0.1
  105.  return
  106.  GuiClose:
  107.  try
  108.     {
  109.         WinShow,%Target_Window%
  110.     }
  111.     ExitApp
  112. Hide_Window:
  113.    NumPad3::
  114.     if(Target_Window!=null)
  115.     WinHide,%Target_Window%
  116.     return
  117. Show_Window:
  118.    NumPad4::
  119.     WinShow,%Target_Window%
  120.     return
  121.    
  122. Reload:
  123.     Reload
  124. Set_Location:
  125.    Target_Window:=Set_Window(Target_Window)
  126.     GuiControl,,Target_Window,% Target_Window  
  127.     return
  128.  Update_Window:
  129.    Gui,Submit,NoHide
  130.     return
  131.    
  132. Submit_All:
  133.    Gui,Submit,NoHide
  134.     return
  135.  
  136. Set_Pos_1:
  137.    Stop:=1
  138.     Get_Click_Pos(X1,Y1)        
  139.     GuiControl,,Pos_1,%X1%   %Y1%  
  140.     return
  141.  
  142. Set_Pos_2:
  143.    Stop:=1
  144.     Get_Click_Pos(X2,Y2)        
  145.     GuiControl,,Pos_2,%X2%   %Y2%  
  146.     return
  147. Set_Pos_3:
  148.    Stop:=1
  149.     Get_Click_Pos(X3,Y3)        
  150.     GuiControl,,Pos_3,%X3%   %Y3%  
  151.     return
  152. Set_Pos_4:
  153.    Stop:=1
  154.     Get_Click_Pos(X4,Y4)        
  155.     GuiControl,,Pos_4,%X4%   %Y4%  
  156.     return
  157. Set_Pos_5:
  158.    Stop:=1
  159.     Get_Click_Pos(X5,Y5)        
  160.     GuiControl,,Pos_5,%X5%   %Y5%  
  161.     return  
  162. Set_Pos_6:
  163.    Stop:=1
  164.     Get_Click_Pos(X6,Y6)        
  165.     GuiControl,,Pos_6,%X6%   %Y6%  
  166.     return  
  167. Set_Pos_7:
  168.    Stop:=1
  169.     Get_Click_Pos(X7,Y7)        
  170.     GuiControl,,Pos_7,%X7%   %Y7%  
  171.     return  
  172. Set_Pos_8:
  173.    Stop:=1
  174.     Get_Click_Pos(X8,Y8)        
  175.     GuiControl,,Pos_8,%X8%   %Y8%  
  176.     return  
  177. Set_Pos_9:
  178.    Stop:=1
  179.     Get_Click_Pos(X9,Y9)        
  180.     GuiControl,,Pos_9,%X9%   %Y9%  
  181.     return  
  182. Set_Pos_10:
  183.    Stop:=1
  184.     Get_Click_Pos(X10,Y10)      
  185.     GuiControl,,Pos_10,%X10%   %Y10%    
  186.     return  
  187. Stop_Clicker:
  188.    numPad2::
  189.     Stop:=1
  190.     return
  191. Start_Clicker:
  192.    numpad1::
  193.     Run_Auto_Clicker()
  194.     return
  195. Run_Auto_Clicker()
  196.     {
  197.         global
  198.         Stop:=0
  199.         k:=1
  200.         Loop 10
  201.             {
  202.                 if(Clicker_%k%=1&&Pos_%k%=null)
  203.                     {
  204.                         msgbox, set the position
  205.                         return
  206.                     }
  207.                 k++
  208.             }
  209.         if(Target_Window!=null)
  210.             {
  211.                 Clicker_Is_On:=1
  212.                 if(Loop_Clicker==1)
  213.                     {
  214.                         Loop
  215.                             {
  216.                                 if(Stop==1)
  217.                                     {
  218.                                         Clicker_Is_On:=0
  219.                                         return
  220.                                     }
  221.                                 if(Clicker_1==1)
  222.                                     {
  223.                                         Loop, % No_Clicks_1
  224.                                             {
  225.                                                 if(Stop==1)
  226.                                                     {
  227.                                                         Clicker_Is_On:=0
  228.                                                         return
  229.                                                     }
  230.                                                 ControlClick,x%X1% y%Y1%,%Target_Window%,,,, NA x%X1% y%Y1%
  231.                                                 Sleep, %Click_Delay%
  232.                                             }
  233.                                     }
  234.                                 if(Clicker_2==1)
  235.                                     {
  236.                                         Loop, % No_Clicks_2
  237.                                             {
  238.                                                 if(Stop==1)
  239.                                                     {
  240.                                                         Clicker_Is_On:=0
  241.                                                         return
  242.                                                     }
  243.                                                 ControlClick,x%X2% y%Y2%,%Target_Window%,,,, NA x%X2% y%Y2%
  244.                                                 Sleep, %Click_Delay%
  245.                                             }
  246.                                     }
  247.                                 if(Clicker_3==1)
  248.                                     {
  249.                                         Loop, % No_Clicks_3
  250.                                             {
  251.                                                 if(Stop==1)
  252.                                                     {
  253.                                                         Clicker_Is_On:=0
  254.                                                         return
  255.                                                     }
  256.                                                 ControlClick,x%X3% y%Y3%,%Target_Window%,,,, NA x%X3% y%Y3%
  257.                                                 Sleep, %Click_Delay%
  258.                                             }
  259.                                     }
  260.                                 if(Clicker_4==1)
  261.                                     {
  262.                                         Loop, % No_Clicks_4
  263.                                             {
  264.                                                 if(Stop==1)
  265.                                                     {
  266.                                                         Clicker_Is_On:=0
  267.                                                         return
  268.                                                     }
  269.                                                 ControlClick,x%X4% y%Y4%,%Target_Window%,,,, NA x%X4% y%Y4%
  270.                                                 Sleep, %Click_Delay%
  271.                                             }
  272.                                     }
  273.                                 if(Clicker_5==1)
  274.                                     {
  275.                                         Loop, % No_Clicks_5
  276.                                             {
  277.                                                 if(Stop==1)
  278.                                                     {
  279.                                                         Clicker_Is_On:=0
  280.                                                         return
  281.                                                     }
  282.                                                 ControlClick,x%X5% y%Y5%,%Target_Window%,,,, NA x%X5% y%Y5%
  283.                                                 Sleep, %Click_Delay%
  284.                                             }
  285.                                     }
  286.                                 if(Clicker_6==1)
  287.                                     {
  288.                                         Loop, % No_Clicks_6
  289.                                             {
  290.                                                 if(Stop==1)
  291.                                                     {
  292.                                                         Clicker_Is_On:=0
  293.                                                         return
  294.                                                     }
  295.                                                 ControlClick,x%X6% y%Y6%,%Target_Window%,,,, NA x%X6% y%Y6%
  296.                                                 Sleep, %Click_Delay%
  297.                                             }
  298.                                     }
  299.                                 if(Clicker_7==1)
  300.                                     {
  301.                                         Loop, % No_Clicks_7
  302.                                             {
  303.                                                 if(Stop==1)
  304.                                                     {
  305.                                                         Clicker_Is_On:=0
  306.                                                         return
  307.                                                     }
  308.                                                 ControlClick,x%X7% y%Y7%,%Target_Window%,,,, NA x%X7% y%Y7%
  309.                                                 Sleep, %Click_Delay%
  310.                                             }
  311.                                     }
  312.                                 if(Clicker_8==1)
  313.                                     {
  314.                                         Loop, % No_Clicks_8
  315.                                             {
  316.                                                 if(Stop==1)
  317.                                                     {
  318.                                                         Clicker_Is_On:=0
  319.                                                         return
  320.                                                     }
  321.                                                 ControlClick,x%X8% y%Y8%,%Target_Window%,,,, NA x%X8% y%Y8%
  322.                                                 Sleep, %Click_Delay%
  323.                                             }
  324.                                     }
  325.                                 if(Clicker_9==1)
  326.                                     {
  327.                                         Loop, % No_Clicks_9
  328.                                             {
  329.                                                 if(Stop==1)
  330.                                                     {
  331.                                                         Clicker_Is_On:=0
  332.                                                         return
  333.                                                     }
  334.                                                 ControlClick,x%X9% y%Y9%,%Target_Window%,,,, NA x%X9% y%Y9%
  335.                                                 Sleep, %Click_Delay%
  336.                                             }
  337.                                     }  
  338.                                 if(Clicker_10==1)
  339.                                     {
  340.                                         Loop, % No_Clicks_10
  341.                                             {
  342.                                                 if(Stop==1)
  343.                                                     {
  344.                                                         Clicker_Is_On:=0
  345.                                                         return
  346.                                                     }
  347.                                                 ControlClick,x%X10% y%Y10%,%Target_Window%,,,, NA x%X10% y%Y10%
  348.                                                 Sleep, %Click_Delay%
  349.                                             }
  350.                                     }  
  351.                             }
  352.                     }
  353.             }
  354.     }
  355. Get_Click_Pos(ByRef X,ByRef Y)
  356.     {
  357.         isPressed:=0,i:=0
  358.         Loop
  359.             {
  360.                 Left_Mouse:=GetKeyState("LButton")
  361.                 MouseGetPos,X,Y,
  362.                 ToolTip,Left Click Your Target Location To Set It  `n`nCurrent Location: `nX = %X%`nY = %Y%
  363.                 if(Left_Mouse==False&&isPressed==0)
  364.                     isPressed:=1
  365.                 else if(Left_Mouse==True&&isPressed==1)
  366.                     {
  367.                         MouseGetPos,X,Y,
  368.                         ToolTip,
  369.                         break
  370.                     }
  371.             }
  372.     }  
  373.    
  374.  Set_Window(Target_Window)
  375.     {
  376.         isPressed:=0,i:= 0
  377.         Loop
  378.             {
  379.                 Left_Mouse:=GetKeyState("LButton")
  380.                 WinGetTitle,Temp_Window,A
  381.                 ToolTip,Left Click on the target window twice to set `n`n Current Window: %Temp_Window%
  382.                 if(Left_Mouse==False&&isPressed==0)
  383.                     isPressed:=1
  384.                 else if(Left_Mouse==True&&isPressed==1)
  385.                     {
  386.                         i++,isPressed:=0
  387.                         if(i>=2)
  388.                             {
  389.                                 WinGetTitle,Target_Window,A
  390.                                 ToolTip,
  391.                                 break
  392.                             }
  393.                     }
  394.             }
  395.         return Target_Window    
  396.     }
  397.  *~LButton::
  398.     if(Clicker_Is_On==1)
  399.         {
  400.             Click,
  401.         }
  402.     return
  403.  
  404.  *^Esc::
  405.  try
  406.     {
  407.         WinShow,%Target_Window%
  408.     }
  409.  ExitApp
Add Comment
Please, Sign In to add comment