FindImage Portability

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
atapper
Newbie
Posts: 18
Joined: Wed Dec 17, 2008 2:10 pm
Location: Minnesota,USA

FindImage Portability

Post by atapper » Fri Oct 23, 2009 1:08 pm

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?
Andrew Tapper
Engineering Manager
Forward Technology
Cokato, MN

gdyvig
Automation Wizard
Posts: 447
Joined: Fri Jun 27, 2008 7:57 pm
Location: Seattle, WA

FindImagePos

Post by gdyvig » Fri Oct 23, 2009 2:20 pm

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

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts