Need help with auto clicking and ghost mouse.

Ask gaming related questions (AHK v1.1 and older)
Blist
Posts: 2
Joined: 30 May 2021, 08:11

Need help with auto clicking and ghost mouse.

19 Jun 2021, 15:27

So this is my first script ever made, i have to it to search for the color i found with my color detection and i have no idea how to make it auto click every 15 or 30 seconds and i also want to add a ghost mouse into it but i have absolutely no idea how to do either one. only reason i got this far is because i copied and im not gonna lie lol. if anyone can help by inserting or telling me what and where to insert it i would really appreciate it.

Code: Select all

1::

loop
{

;Color ID: 0x6D9966
PixelSearch, Px, Py, 6, 36, 518, 368, 0x6D9966, 1, Fast

if (ErrorLevel = 0) {
	Mousemove, Px, Py, 15
}
else {
}
}

2::reload
Esc::ExitApp
User avatar
mikeyww
Posts: 26883
Joined: 09 Sep 2014, 18:38

Re: Need help with auto clicking and ghost mouse.

19 Jun 2021, 15:40

Perhaps this helps a bit.

Code: Select all

1::
SoundBeep, 1500
Loop
{
 Sleep, 100
 PixelSearch, x, y, 6, 36, 518, 368, 0x6D9966, 1, Fast RGB
 If !err := ErrorLevel
  MouseClick,, x, y,, 15
} Until err
SoundBeep, 1000
Return
A clicker:

Code: Select all

SetTimer, Clik, 15000
Clik:
Click
Return
Last edited by mikeyww on 19 Jun 2021, 15:42, edited 1 time in total.
Sally2Q
Posts: 43
Joined: 16 Jun 2021, 10:18

Re: Need help with auto clicking and ghost mouse.

19 Jun 2021, 15:41

Not exactly sure what you want from your wording but something like this?

Code: Select all

1::SetTimer, Label, % (Toggle:=!Toggle) ? 10000 : "Off"
label:
{
   random RV 1,5000 
   sleep RV  
   PixelSearch, Px, Py, 6, 36, 518, 368, 0x6D9966, 1, Fast
   

if (ErrorLevel = 0) {
	Mousemove, Px, Py, 15
    click 
}
[Mod edit: [code][/code] tags added.]

the label loop block repeats every 10 seconds with a random 0-5 second delay and then clicks if the image was found.
Blist
Posts: 2
Joined: 30 May 2021, 08:11

Re: Need help with auto clicking and ghost mouse.

19 Jun 2021, 16:16

I just want to add a timer and to make it actually click and also make it a ghost mouse, to where I can play another game while it is clicking.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 80 guests