WindowMover demonstrates techniques that let you take ultimate control of your desktop. While it focuses on managing window positions for dual monitor systems, you can easily borrow from or extend it for general-purpose UI automation.
by Gigi Sayfan
April 24, 2008
indowMover is a little project originally created for a study that involved tracking the gaze of subjects when presented with various images. The study used a special eye-tracker device that comes with control software. The device itself is excellent, but the control software leaves a lot to be desired. In addition to serious memory management issues, it requires images to be presented on the primary display, while the control software runs on a secondary display. This is a problem, because test subjects should not be distracted by other windows popping up during an experiment, or even have to see the taskbar in the background. WindowMover solves the problem by ensuring that only the image presentation runs on the primary display; it moves all other windows to the secondary display automatically. WindowMover works on Windows only, but you could apply the concept and the techniques to other graphical operating systems.
How WindowMover Works
WindowMover works by constantly monitoring all the visible top-level windows. It keeps a list of target windows that should remain on the primary display. When a window shows up on the primary display WindowMover checks if it's on the target list; if not, WindowMover moves the window to the secondary display. That sounds simple enough. I originally estimated it would take me a few hours. It turned out to be more complicated than that. Maximized windows require special treatment, and different screen dimensions for the primary and secondary displays require special adjustment. WindowMover handles such problems automatically.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!