pixelsearch with controlclick

Ask gaming related questions (AHK v1.1 and older)
S1lver
Posts: 23
Joined: 07 Nov 2020, 04:14

pixelsearch with controlclick

15 Jun 2022, 17:49

Hello everyone.
I'm in serious help, no topic on the google internet has made a post about this.
I'm not good at scripting, since I cannot understand why my commands won't work when I follow the exact guide in AHK's manual.

I'm trying to create a script which sounds very simple to me.
first I wants to pixel search an area. just like the Pixel Predator does here in the forum. however I wants to click the moving pixel, without it moving my mouse. i was thinking I should use ControlClick, but that does nothing when I type it in like they write in the Manual.
i wants to be able to control my mouse in a window, while the script click in another window at the same time. how can it be done?

here is the simplest idea I could come up with but it does not work.

Code: Select all

#NoEnv
#SingleInstance Force
SendMode Input
SetControlDelay -1
CoordMode, Pixel, screen

target := ahk_pid "my ID number I get from using Window Spy"  ;; I wants to use target, so I wont have to write the ahk_pid id all the time.

!Q::reload

!s::

;;PixelSearch, OutputVarX, OutputVarY, X1, Y1, X2, Y2, ColorID , Variation, Mode ;; this is also confusing, I see people using W: and H: instead of X2 and Y2, anyway I try to follow the guidelines.

PixelSearch, Px, Py, 2090, 550, 2415, 750, 0x18FC00, 0, fast, rgb
controlClick, x%Px% x%Py%, target, Left, 1, pos, NA
suggestions are very appreciated. Cheers
User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: pixelsearch with controlclick

22 Jun 2022, 20:26

I guess if it's very simple, then someone would have posted the very simple solution! :) Cheers.

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 99 guests