Default repositioning of Mouse shows desktop in Windows 7

An FYI for everyone.

I have discovered that between commands Eggplant likes to reposition the mouse to the bottom right of the screen. The problem is that in Windows 7 if you put your mouse over there… it shows the desktop.

  1. Can I turn this feature off in Windows 7?

  2. If not you can just put:

set the shouldRepositionMouse to False

in the parameters at the beginning of your script

A little background on this behavior: When we started developing eggPlant, many VNC servers made the cursor part of the image. This would cause the image match to fail if the cursor was over an element that had been captured without the cursor. The solution was to search the screen once and if the image wasn’t found, move the cursor to a position “out of the way” and try the search again. You’ll still see this happen if the first search appears before the thing eggPlant is looking for gets drawn to the screen, or if you’re running with rich cursors turned off. It’s generally not necessary to leave it on (and you can disable it in the “Run Options” preferences), but we leave it on by default because it’s usually benign.

Occasionally situations may still arise in which moving the mouse out of the way while searching is helpful. Just to be clear about how this works: Eggplant searches the screen first without moving the mouse, then repositions it before searching the second and subsequent times.

In cases where repositioning the mouse is needed you can control the point to which the mouse is moved when it is repositioned, by setting the RepositionPoint global property. Although it’s not well documented, you can set this to negative coordinates to indicate a distance away from the right and bottom edges of the screen. The default value is (-1,-3) which is slightly away from the corner (enough to avoid triggering a screen saver or other action on a Mac), but you can set it to be farther from the corner or to a different corner of the screen if needed.

I am sorry for resurrecting what seems to be an old post, but I encountered the problem very recently.

The solution is to right-click on the Desktop peek buttom (lower right corner of the screen) and to change the settings there. Disable the Peek at Desktop option from the menu, and this no longer is a problem.

I found this a more reliable solution then changing the reposition point for my scripts, and disabling it altogether gave me issues with buttons that react to the mouse hover.