Running stuff in the background

Ask gaming related questions (AHK v1.1 and older)
TheWildHuli
Posts: 12
Joined: 25 Jan 2023, 15:26

Running stuff in the background

Post by TheWildHuli » 26 Jan 2023, 21:57

Hello,
I am trying to run a specific script in the background on a certain application without it affecting me. I keep getting an error though. Does anyone know how to fix it? I keep getting the error x and y need to be both present or absent.

My code:

Code: Select all

^m::

WinGet, MinecraftLauncherid,List, MouseClick, Minecraft Launcher
Loop
{
 
MouseClick, left, ahk_id %MinecraftLauncherid1%
Sleep 1500 

}

^Esc::ExitApp

[Mod edit: Removed excessive blank lines and added [code][/code] tags. Please use them yourself when posting code.]

User avatar
boiler
Posts: 16768
Joined: 21 Dec 2014, 02:44

Re: Running stuff in the background

Post by boiler » 26 Jan 2023, 23:35

There is no WinTitle parameter in the MouseClick command, and you put WinTitle-type information in the X parameter spot. You can’t make up syntax.

User avatar
boiler
Posts: 16768
Joined: 21 Dec 2014, 02:44

Re: Running stuff in the background

Post by boiler » 26 Jan 2023, 23:53

By the way, you also made up syntax in the WinGet command unless your window’s title is MouseClick and the window elsewhere contains the text Minecraft Launcher, which surely isn’t the case.

In your other thread, mikeyww suggested you use ControlClick, but apparently you decided not to follow his advice for some reason.

TheWildHuli
Posts: 12
Joined: 25 Jan 2023, 15:26

Re: Running stuff in the background

Post by TheWildHuli » 27 Jan 2023, 15:02

Alright, ill look at the control thing.

Post Reply

Return to “Gaming Help (v1)”