Trying to make an idle Autoclicker Topic is solved

Ask gaming related questions (AHK v1.1 and older)
WingbtZ
Posts: 22
Joined: 09 Aug 2018, 04:41

Trying to make an idle Autoclicker

08 Oct 2018, 08:38

Hello,

So I have a script that Loops a ControlClick at a random pos on a Chrome window (Web browser game) until break.
So the script is spaming ControlClick, but I have the problem that I cannot use my mouse while the script is running.. As in, I cannot use the mouse to click in another window while the loop is running.

So my question is, is there a way to make my script work, and still use my own mouse to other things? Almost like the ControlClick is sent by a fake/virtual mouse or something. Or maybe that is not possible with AHK?

Thanks!
WingbtZ
Posts: 22
Joined: 09 Aug 2018, 04:41

Re: Trying to make an idle Autoclicker

09 Oct 2018, 07:06

Experimental code so far..

Code: Select all

^Escape::Reload
#MaxThreadsPerHotkey 3
^LButton::
#MaxThreadsPerHotkey 5
SetTitleMatchMode 2
if Toggle
{
Toggle := false
return
}
Toggle := true
Loop
{
ControlClick, x300 y500, Cookie Clicker,,Left
if not Toggle
Break
}
Toggle := false
return
Rohwedder
Posts: 7610
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Trying to make an idle Autoclicker  Topic is solved

12 Oct 2018, 04:02

Hallo,
try:

Code: Select all

^Escape::Reload
^LButton::SetTimer ControlClick,% (Toggle := !Toggle) ? 100 : "Off"
ControlClick:
If A_TimeIdle < 500
	Return
SetTitleMatchMode 2
ControlClick, x300 y500, Cookie Clicker,,Left
Return
WingbtZ
Posts: 22
Joined: 09 Aug 2018, 04:41

Re: Trying to make an idle Autoclicker

15 Oct 2018, 05:55

Rohwedder wrote:
12 Oct 2018, 04:02
Hallo,
try:

Code: Select all

^Escape::Reload
^LButton::SetTimer ControlClick,% (Toggle := !Toggle) ? 100 : "Off"
ControlClick:
If A_TimeIdle < 500
	Return
SetTitleMatchMode 2
ControlClick, x300 y500, Cookie Clicker,,Left
Return
Thank you for the help! This kind of worked :superhappy:
I only had time to test it breefly, but it worked for the most of the time. Sometimes the mouse still got abit wonky, but maybe it will work better when I take a closer look at it.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 45 guests