ImageSearch In the background Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
KongKing
Posts: 76
Joined: 22 May 2022, 09:41

ImageSearch In the background

Post by KongKing » 01 Sep 2022, 21:20

Hi! How to run ImageSearch in the background so that after clicking eg "g" left click on the image?

Rohwedder
Posts: 7768
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: ImageSearch In the background  Topic is solved

Post by Rohwedder » 02 Sep 2022, 01:11

Hallo,
ImageSearch rearches a region of the screen for an image, not a region of a defined window.
https://www.autohotkey.com/docs/commands/ImageSearch.htm#Remarks
The region to be searched must be visible; in other words, it is not possible to search a region of a window hidden behind another window. By contrast, images that lie partially beneath the mouse cursor can usually be detected. The exception to this is game cursors, which in most cases will obstruct any images beneath them.
(If you only have one monitor, you could try to fool Windows into thinking you have a second monitor. If I turn off my second monitor, ImageSearch can still find images there.)

Post Reply

Return to “Ask for Help (v1)”