Log In | Not a Member? | Support | |
SYNTAX Commando [commandName] [-modify] [-navsvc | -stdfile] DESCRIPTION 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.
Note 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: • Commando commandName • commandName… (Create the ellipsis by using Option-semicolon) • commandName <Option-Enter> If you invoke Commando by using the first method, such as Commando StreamEdit 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 StreamEdit… StreamEdit <Option-Enter> 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.
Note 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. INPUT None OUTPUT None, unless you invoke a Commando dialog box by typing Commando commandName 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.
Note STATUS
Commando can return the following status codes:
PARAMETERS commandName Specifies the name of the command for which Commando produces a dialog box. OPTIONS -modify Enables you to edit Commando dialog boxes. -navsvc Forces the use of Navigation Services dialogs (if Navigation Services is available). -stdfile Forces the use of StandardFile dialogs. EXAMPLES Executing the following command line displays the Commando dialog box for the CMarker tool. Commando CMarker
|