|Log In | Not a Member?||Contact ADC|
Commando [commandName] [-modify] [-navsvc | -stdfile]
The Commando tool lets you create and execute a command line for any MPW command, tool, or script by using specialized Macintosh dialog boxes called Commando dialog boxes instead of the ordinary command-line method. Each Commando dialog box contains controls in the form of text fields, buttons, checkboxes, and pop-up menus that represent elements in the command's syntax. When you use a Commando dialog box and its controls to specify your options and choices, MPW efficiently composes a syntactically correct command line for that command.
When the Commando dialog box first appears, the Command Line field contains only the name of the command (for example, StreamEdit). By selecting other dialog box controls, such as buttons, checkboxes, and pop-up menus, you can add options, parameters, and other elements of the command's syntax to the command line. As you click different controls, the Help field changes from a description of the command to a description of that syntax element. Commands with many options and parameters often employ one or more nested dialog boxes.
To invoke a commando dialog box, use one of the following methods:
commandName (Create the ellipsis by using Option-semicolon)
If you invoke Commando by using the first method, such as
Commando writes to standard output the command line you subsequently create when you click the "do it" button to close the dialog box. The "do it" button is located at the lower right of the dialog box and is labeled with the command's name.
If you invoke Commando using either of the other methods, such as
MPW executes the command line when you click the "do it" button to close the dialog box.
You can quit Commando, without writing or executing the command line, by clicking Cancel.
The Commando dialog box for the tool StreamEdit is reproduced below. Although the Commando dialog boxes have individual differences for each command, they all have the same basic control structure shown here.
Commando dialog boxes are movable. In addition, Commando allows you to change the appearance of a commando dialog box, if you specify the -modify option on the command line or hold down the Command key while the Commando dialog box is opening (and displaying the beach ball cursor). You can resize and move the controls (including text fields, buttons, and menu titles) using the mouse exactly as you would in the Finder, except you must hold down the Option key as you drag controls.
Commando dialog boxes are stored as 'cmdo' resources in each tool or script. For MPW built-in commands, the 'cmdo' resources are part of the MPW Shell application. If a Commando dialog box has been modified when the "do it" button is clicked, you are prompted to replace the existing 'cmdo' resource with the new modified version. If you choose to replace the existing 'cmdo' resource, the original format of the Commando dialog box is lost.
None, unless you invoke a Commando dialog box by typing
In this case, Commando writes the command line you created to standard output when you click the "do it" button. If you invoke Commando by using one of the other methods discussed in "Description," Commando executes the command line when you click the "do it" button.
Commando can return the following status codes:
Specifies the name of the command for which Commando produces a dialog box.
Enables you to edit Commando dialog boxes.
Forces the use of Navigation Services dialogs (if Navigation Services is available).
Forces the use of StandardFile dialogs.
Executing the following command line displays the Commando dialog box for the CMarker tool.