A script that combines many uses of the AutoHotkey ImageSearch command into one powerful and easy-to-use function. Older version can be seen here. (Download older version here - the code is messed up in the forum post.)

I would like to ask, whether this function can find pictures in a minimized window?

Unfortunately it cannot. ImageSearch only deals with on-screen images, that is, images that are currently being rendered by your computer's graphics processor and being output to a display device of some sort. (However, the display device doesn't need to be turned on.)

Any chance of an example? I had this error when I tried to add the option "Stay"

Thanks for posting this samfy! I just added this error box and wasn't hoping to ever see it needed!

I'd like you to answer a couple of questions so I can get a better idea of why this happened, and hopefully how to fix it.

What was the code of the imagefile & options you used for findclick when this error came up? Using the "stay" option should not incur this error. Does it happen every time you use findclick?

Do you have access to the directory shown in the error dialog box? On a related note, why is your root dir D:\ ? Just curious.

Try calling findclick with no parameters, e.g. FindClick(). Then when the window comes up, press pause and press test. Does the error come up when you press "test" ?

What version of AutoHotkey are you using? (unicode/ansi, x64/x86)? What operating system are you using? 64 bit?

I really appreciate your help in trying to iron out the kinks in this function!!

Thanks for your help Larctic but I don't think I will be able to incorporate any of those features into this function. As a student I have limited time and want to focus on refining the code & documentation for findclick before I add new features.

If there are 17 instances of the same exact image on the screen, how do you select the 4th instance ONLY and ignore the rest?

Good question. The answer is that you have to write some of your own AutoHotkey code to interpret the coordinates that FindClick gives you. I added an example to the documentation https://www.cubby.co...7/FindClick.pdf - you can find it on the last page.

Unfortunately it cannot. ImageSearch only deals with on-screen images, that is, images that are currently being rendered by your computer's graphics processor and being output to a display device of some sort. (However, the display device doesn't need to be turned on.)

Thanks for posting this samfy! I just added this error box and wasn't hoping to ever see it needed!

I'd like you to answer a couple of questions so I can get a better idea of why this happened, and hopefully how to fix it.

What was the code of the imagefile & options you used for findclick when this error came up? Using the "stay" option should not incur this error. Does it happen every time you use findclick?

Do you have access to the directory shown in the error dialog box? On a related note, why is your root dir D:\ ? Just curious.

Try calling findclick with no parameters, e.g. FindClick(). Then when the window comes up, press pause and press test. Does the error come up when you press "test" ?

What version of AutoHotkey are you using? (unicode/ansi, x64/x86)? What operating system are you using? 64 bit?

I really appreciate your help in trying to iron out the kinks in this function!!

It's Safmy.

1. The code is at the end, no options added. It didn't happen the first time I tried it, it's slightly temperamental I can't seem to replicate the condition in which it works.

2. I installed a second windows (64 bit) onto my D:\, my C: has the 32 bit version. I do have access to the directory.

3. Yes it does, the code below illustrates that.

4. 64 bit unicode is installed. My operating system is 64 bit.

I love your funciton by the way. I do a lot of image searches and this is a lacking function I think. Pullover's recorder is the next best thing I've got.

1. The code is at the end, no options added. It didn't happen the first time I tried it, it's slightly temperamental I can't seem to replicate the condition in which it works.
2. I installed a second windows (64 bit) onto my D:\, my C: has the 32 bit version. I do have access to the directory.
3. Yes it does, the code below illustrates that.
4. 64 bit unicode is installed. My operating system is 64 bit.

Thanks for all the help you've been, Samfy. Unfortunately I haven't been able to reproduce your error. I tested it again with AutoHotkey x64 (I'm already using 64 bit windows) with no errors building the image file.
I'm wondering if maybe there is some issue with your temporary dir? I.e., why is it the "short version" of the path (it contains "ADMIN1~1"). I was wondering if you could change the following declaration in the FindClick code (should be around line #1250):