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

MPW Command Reference


Save

Built-in

SYNTAX

Save [[window1] [window2]… | -a]

DESCRIPTION

The Save command saves the contents of one or more windows without closing them. As of MPW 3.3, this command also forces a save of the resource fork of the file if the format (font and tabs), scroll bar position, window position, or size has been modified, even if the text has not changed.

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

Save can return the following status codes:

0

no errors

1

syntax error

2

specified window does not exist

PARAMETERS

window1 [window2]…

Specifies one or more windows to save. If you omit this parameter, the contents and other attributes of the target window are saved.

OPTIONS

-a

Saves all open windows. Note that you cannot specify any windows when using this option.

EXAMPLES

The following command line saves the contents and other attributes of the Test window:

Save Test

The next command line saves the contents and other attributes of the active and Worksheet windows. Notice how the {Active} and {Worksheet} variables are enclosed in quotation marks in case they expand to window names that contain spaces or special characters.

Save "{Active}" "{Worksheet}"

SEE ALSO

Close

Revert

 
 


Last Updated July 2000