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