I have used the FindImage command with good success in programs that I have written for use on my PC, but I have problems when I create exe files and try them on other PCs. I believe the problem is in the different resolutions. I have tried adjusting the color tolerance, but no luck.
Has anyone got any good tricks for making the FindImage command more portable?
FindImage Portability
Moderators: JRL, Dorian (MJT support)
FindImage Portability
Andrew Tapper
Engineering Manager
Forward Technology
Cokato, MN
Engineering Manager
Forward Technology
Cokato, MN
FindImagePos
Hi atapper,
There are numerous postings in the forums and the blog describing tricks for various situations. Here are some good search words: FindImagePos, FIP, Image Recognition, IR, color, tolerance, RGB, banding, dithering, banding, needle, and haystack.
I'll restate a few tips here.
1. Consider your audience - can you ask them to adapt set of standard display settings?
2. All of the display settings for the development and display machines should be the same for portability. Anything that affects how an image is displayed. It is best to turn all Effects (such as font smoothing off).
3. All users should access applications in the same manner if possible, for example you may have problems if some use VNC, remote desktop, others use a Citrix client. These products are affected by both the client and host display settings.
If you can't get all the machines to adhere to exactly the same standards these techniques will make scripts more portable:
4. Keep needle images small - do not include bits of background that may change.
5. Needle images should not include multiple objects whose spacing may change with different screen resolutions or other scenarioes.
6. Create multiple versions of needle images whose appearance varies by machines, then create a subroutine that cycles through the images until the correct one is found.
7. Use non-image techniques such as the various Macro Scheduler Windows commands when these are more reliable.
Here are some tips from the blog:
http://www.mjtnet.com/blog/2009/02/13/i ... -mistakes/
Gale
There are numerous postings in the forums and the blog describing tricks for various situations. Here are some good search words: FindImagePos, FIP, Image Recognition, IR, color, tolerance, RGB, banding, dithering, banding, needle, and haystack.
I'll restate a few tips here.
1. Consider your audience - can you ask them to adapt set of standard display settings?
2. All of the display settings for the development and display machines should be the same for portability. Anything that affects how an image is displayed. It is best to turn all Effects (such as font smoothing off).
3. All users should access applications in the same manner if possible, for example you may have problems if some use VNC, remote desktop, others use a Citrix client. These products are affected by both the client and host display settings.
If you can't get all the machines to adhere to exactly the same standards these techniques will make scripts more portable:
4. Keep needle images small - do not include bits of background that may change.
5. Needle images should not include multiple objects whose spacing may change with different screen resolutions or other scenarioes.
6. Create multiple versions of needle images whose appearance varies by machines, then create a subroutine that cycles through the images until the correct one is found.
7. Use non-image techniques such as the various Macro Scheduler Windows commands when these are more reliable.
Here are some tips from the blog:
http://www.mjtnet.com/blog/2009/02/13/i ... -mistakes/
Gale