ImageSearch reliability
Posted: 14 Apr 2024, 03:05
Hello everyone.
First off I'd like to say that AHK has been a fantastic tool and I am thoroughly enjoying the process of making scripts and tinkering. Learning this has been very enjoyable for me. I mainly use it to automate things on games.
I have come across some strange behaviour however that maybe this forum could shed some light on. I am having problems with imagesearch.
When I run this script. It works everytime.
However, when i define an area it does not work at all or very little.
I've been tinkering with it for a few days but can't seem to figure it out. I understand that pixel variations can cause issues but the whole screen search works fine most times but the defined area doesn't. I am using Coordmode window for the defined area search.
Any advise?
[Mod edit: Moved topic from AHK v2 help since this is v1 code. I also added some missing I's in front of 'magesearch'.]
First off I'd like to say that AHK has been a fantastic tool and I am thoroughly enjoying the process of making scripts and tinkering. Learning this has been very enjoyable for me. I mainly use it to automate things on games.
I have come across some strange behaviour however that maybe this forum could shed some light on. I am having problems with imagesearch.
When I run this script. It works everytime.
Code: Select all
ImageSearch, FoundX, FoundY, 0, 0, A_ScreenWidth, A_ScreenHeight, image.png
Code: Select all
ImageSearch, FoundX, FoundY, 10, 10, 550, 550, image.png
Any advise?
[Mod edit: Moved topic from AHK v2 help since this is v1 code. I also added some missing I's in front of 'magesearch'.]