Tools: MPW
Advanced Search
Apple Developer Connection
Member Login Log In | Not a Member? Support

MPW Command Reference


StackWindows

Built-in

SYNTAX

StackWindows [window… | -i] [-h n] [-r t,l,b,r] [-v n]

DESCRIPTION

The StackWindows command sizes and moves the specified windows (except the Worksheet) so that they are staggered diagonally across the screen. Use this command, for example, when selecting windows from the Window menu, because it makes dealing with many open windows easier.

To stack all open MPW Shell windows, you can execute StackWindows without any parameters. In this case you have the option of including the Worksheet window (-i).

Additionally, you can specify the horizontal and vertical staggering constants (-h and -v); normally, staggering is 5 pixels horizontally and 20 pixels vertically.

INPUT

None

OUTPUT

None

ALIAS RESOLUTION

This command resolves Finder aliases that are part of a partial or complete pathname substituted for the window name. The resolved pathname must specify the name of an open window. Note that using a shell variable to designate a window is usually faster than requiring MPW to resolve a Finder alias.

STATUS

StackWindows can return the following status codes:

0

no errors

1

syntax error (in parameters)

PARAMETERS

window

Specifies one or more windows to stack. Note that you cannot stack the Worksheet window when specifying a list of windows.

OPTIONS

-h n

Stacks the specified windows with a horizontal spacing of n pixels, where n is a nonnegative number. The default is 5 pixels.

-i

Includes the Worksheet window when stacking if you do not specify a list of windows.

-r t,l,b,r

Stacks windows within the specified rectangle. The rectangle is specified by the coordinates for top, left, bottom, and right. Coordinates must be separated by commas and, if any spaces are included, enclosed in quotation marks, as in this example:

"10, 10, 300, 500"

The default rectangle is the entire screen, minus the menu bar. The coordinates (0,0) are located at the left side of the screen below the menu bar.

-v n

Stacks the specified windows with a vertical spacing of n pixels, where n is a nonnegative number. The default is 20 pixels, which is the height of a window's title bar.

EXAMPLES

The following command line stacks all open windows, including the WorkSheet:

StackWindows -i

The command line below stacks the active and target windows, with a vertical spacing of 20 pixels and a horizontal spacing of 10 pixels:

StackWindows -v 20 -h 10 "{active}" "{target}"

SEE ALSO

HideWindows

MoveWindow

RotateWindows

ShowWindows

SizeWindow

TileWindows

ZoomWindow

 
 


Last Updated July 2000