I have been using this for a while and it occurred to me today that I could finish it off so that others may find it useful.
It's a little tool to test for colour tolerance.
It's a tool you may find useful but you will have to read the following explanation to see if it is for you.
Over the last couple of years I have found that with my main application some users have problems with the screen recognition part of the application. Usually this is because the buttons that my application looks for are slightly different to the ones I originally included.
I have built in to my application methods for adjusting colour tolerance and also for the user to take their own screen shots which I will then edit for them and send them back their exact buttons.
Even so, many users don't bother to do this and they write to me for help.
I have also built into my application a routine that automatically zips up a copy of the user's screen and the button it was looking for. I then look at that and see if I can tell why the button has not been found.
Often, it is down to tolerance. Sometimes it is a small offset and sometimes large.
I started work on adding a loop into my main application that adjusts tolerance upwards depending on if it finds the button or not. As you can imagine this is slightly problematic due to the number of different buttons to look for etc.
So I use this application to check the file that the user sends me.
What it does:
- It will allow you to select a needle and haystack file
It will then check the haystack for the needle with a colour tolerance of 1 (exact perfect match).
If the needle is not found it will then add 1 to the tolerance and try again until it finds the needle or until the max tolerance (255) is reached.
It keeps a log of all relevant data (optionally).
It will also allow you to search for more than the 1st match (i.e. set a value of 3 and the script will stop when it has found 3 of the needles).
http://www.pendlebury.biz/applications/
Contained in this zip file are:
- The script folder
A compiled exe file version of the script in case you cannot compile.
The script (scp) file in case you want to look at it (I will also post it below this with some screen shots).
If anyone would like to add anything to make this more useful you would be more than welcome. Please share your additions.
Also if anyone can find fault with my scripting you are also welcome to share that. There are some things that may look a bit odd but usually there is a reason for them.
Cheers,
Phil.
PS. If Marcus thinks this may be useful feel free to sticky.