Page 1 of 1

auto clicker that can run with minimized app

Posted: 15 Apr 2024, 14:03
by dtestqweiop
Hi guys, newbie here

Im using hotkey for macro playing games whilst working, So I'm trying to figure out how to loop key presser that will send to specific window while I still can use the computer.

Here's my current script:

Code: Select all

^6::

Loop
{
ifWinExist, "ahk_pid 14736"
ControlSend,, 2, "ahk_pid 14736"
Return	
}

^7::pause

[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]

[Mod action: Topic moved from "Tutorials (v2)" since this is v1 code and it is not a turtorial but rather a request for help.]

Re: auto clicker that can run with minimized app

Posted: 15 Apr 2024, 16:02
by mikeyww
Welcome to this AutoHotkey forum!

Is there a question at hand? If so, what is it? What happens when you run the script? What should it do differently?

Hard-coding a PID is almost never a successful strategy for a script, because the PID will change next time. You might want to use some other WinTitle that instead refers to the window title, window class, process name, etc.

If you are new to AHK, I recommend using its current version, which is v2, instead of this older deprecated version that is no longer developed.

viewtopic.php?f=82&t=128756