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

MPW Command Reference


ShowSelection

Built-in

SYNTAX

ShowSelection [window] [-b | -c | -l line | -n lines | -t]

DESCRIPTION

The ShowSelection command positions your selection in the specified window. You can make a selection by either selecting text in the window or using -l to specify a line number. You can use other options to indicate the location at which you want the selection to appear.

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

ShowSelection can return the following status codes:

0

no errors

1

line number out of the window's range (-l or -n)

2

invalid window

PARAMETERS

window

Specifies the window in which you want the text positioned.The target window is the default.

OPTIONS

-b

Places the selection at the bottom of the window.

-c

Places the selection at the center of the window.

-l line

Moves the numerically specified line to the top of the window.

-n lines

Moves the selection the specified number of lines from the top.

-t

Places the selection at the top of the window.

EXAMPLES

The following command line places the selection nine lines from the top of the target window:

ShowSelection {target} -n 9

By omitting the window parameter, the following command line has the same effect as the previous one:

ShowSelection -n 9

 
 


Last Updated July 2000