Window Move and Size
The Window Move and Size command provides an easy method for sizing and positioning a window on the screen. Set up automated sequences for rearranging windows on the desktop. Or standardize the window position and size for each macro run to ensure that mouse moves and clicks work correctly.
Script Editor > Expand Windows/Programs Category > Window Move and Size
Select a Window
Choose from the drop down list whether to reposition the current window or a specific window.
Current Window
This refers to the window that has focus when the Window Move and Size command runs.
Specific Window
Enter the title of the specific window to be moved and resized. Or click on the Select Window button to see a list of all windows currently running. Select the window needed and the title is inserted in the edit box.
Exact Match
This requires that the window name entered matches exactly with the name of the window to be moved and resized. For example, if listing Notepad as the window name, but the actual window title is Notepad - Untitled, then the command would fail.
Partial Match
The Partial Match option does not require an exact window title match. For example, if resizing or moving a notepad window, inserting "notepad" or "notep" as the window title will find the window. This is particularly useful as some Window Titles change based on whether a given file is open. Case sensitivity is not required. For example, "NOTepad" will work as well as "notepad".
Contains wildcards
Select this option if a wildcard is included in the window title name. A wildcard uses the " * " or " ? " characters in the title to expand the possibilities of a match. These are similar to the wildcards used in Windows for searches.
Coordinates
Enter the coordinates manually or use the Size and Position Tool to simplify the process.
Specify Exact Size and Location
Enter the coordinates directly into the edit box. The Left and Top options determine the location of the window. The Height and Width options determine the size of the window. The values are expressed in pixels.
If using multiple monitors, select which monitor to display the window. The first monitor receives a value of 0 (zero). A second monitor receives a value of 1 (one), the third monitor 2 (two), and so on. If using a single monitor, leave the setting as 0.
Below is an example of setting the exact size and location of a window.
Setting |
Value |
Description |
Left |
100 |
The left edge of the window is positioned 100 pixels to the right of the left side of the screen. |
Top |
200 |
The top edge of the window is positioned 200 pixels down from the top of the screen. |
Width |
600 |
The window is sized to 600 pixels in width. |
Height |
750 |
The window height is set to 750 pixels. |
Monitor |
0 |
Zero represents the main monitor. |
Set Size and Position Tool
Click the Set Size and Position button for a simple way to select the size and position of the window. Clicking on this button opens the Window Move and Size window and the Dialog Positioner. Stretch this window to the size needed and drag to the location desired. Or after sizing the window, click on one of the position buttons in the Dialog Positioner to have the window move to the location indicated.
Click OK to save. The pixel values are automatically filled out.
When the macro is run, the window selected in the Window Title field is moved and sized to the same location and dimensions as drawn in the Window Tool window.
The Window Position and Size topic explains these options in detail.