ControlSend + imagesearch

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bittencourt318
Posts: 85
Joined: 16 Apr 2020, 10:57

ControlSend + imagesearch

Post by bittencourt318 » 28 Jan 2023, 09:34

has any way ControlSend works with the screen minimized next to an imagesearch?
ControlSend works alone but next to imagesearch would not have any way to solve this?

Code: Select all

EX:
loop
{
ImageSearch, X, Y, A_ScreenWidth - 368, 0, A_ScreenWidth, A_ScreenHeight + 470, %image%
if ErrorLevel = 0
{
ControlSend, , {esc}, ahk_id %id%
sleep, 5000
}
}
return

[Mod edits: Removed excess white space and applied code tags to entire script instead of just one line.]

User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: ControlSend + imagesearch

Post by Xtra » 28 Jan 2023, 12:36

The ImageSearch command requires the image to be visible on the screen to detect it.
Image searching a minimized window will fail and show 2 for ErrorLevel when checked.

Post Reply

Return to “Ask for Help (v1)”