DetectHiddenWindows on
1::
imagesearch,vx,vy,1,1,1920,1080,1.bmp
if !errorlevel
{
wingettitle,title,ahk_exe target.exe
PostClick(vx,vy,title)
}
return
PostClick(x,y,win="A") {
lParam := x & 0xFFFF | (y & 0xFFFF) << 16
PostMessage, 0x201, , %lParam%, , %win% ;WM_LBUTTONDOWN
PostMessage, 0x202, , %lParam%, , %win% ;WM_LBUTTONUP
}
I use the imagesearch to find the x,y and click on the postmessage. But it does not work.
why it does not work?
1::
imagesearch,vx,vy,1,1,1920,1080,1.bmp
if !errorlevel
{
wingettitle,title,ahk_exe target.exe
PostClick(vx,vy,title)
}
return
PostClick(x,y,win="A") {
lParam := x & 0xFFFF | (y & 0xFFFF) << 16
PostMessage, 0x201, , %lParam%, , %win% ;WM_LBUTTONDOWN
PostMessage, 0x202, , %lParam%, , %win% ;WM_LBUTTONUP
}
I use the imagesearch to find the x,y and click on the postmessage. But it does not work.
why it does not work?