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

MPW Command Reference


Windows

Built-in

SYNTAX

Windows [-clean] [-dirty] [-e] [-h] [-o] [-q] [-v]

DESCRIPTION

The Windows command writes the full pathname of each file currently in a window. The names are written to standard output, one per line, from backmost to frontmost.

INPUT

None

OUTPUT

Standard output.

STATUS

Windows can return the following status codes:

0

no error

1

syntax error

PARAMETERS

None

OPTIONS

-clean

Lists only "clean" windows. "Clean" windows are those which have not been altered since the last Save.

-dirty

Lists only "dirty" windows. "Dirty" windows are those which have been altered and not yet Saved.

-e

Excludes the Worksheet window from the list.

-h

Lists only hidden windows.

-o

Writes to standard output a series of Open commands that, when executed, open each file currently in a window. The Open commands are written one per line. In the case of read-only files, a -r option is specified. In the case of hidden files, a -h option is specified.

-q

Inhibits enclosing window names in quotation marks. Normally Windows places quotation marks around names that contain spaces or other special characters.

-v

Lists only visible windows.

EXAMPLES

The following command lists the pathnames of all open windows:

Windows

The following command prints the pathnames of the open windows, using the options specified by the {PrintOptions} variable. This example uses command substitution. Since Windows appears in backquotes (`…`), its output supplies the parameters to the Print command.

Print {PrintOptions} `Windows`

The example below creates an output file named SavedWindows that, when executed, reopens the current set of open windows.

Windows -o > SavedWindows

This technique is used in the Suspend script to save the list of open windows.

SEE ALSO

Open

 
 


Last Updated July 2000