02.07.2013 Views

A/UX® System Administrator's Reference Sections 1M, 7, and 8

A/UX® System Administrator's Reference Sections 1M, 7, and 8

A/UX® System Administrator's Reference Sections 1M, 7, and 8

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

macquery(lM) macquery(lM)<br />

NAME<br />

macquery - post a Macintosh® alert box to query the user<br />

SYNOPSIS<br />

macquery [-t timeout] [-a] [-c] [-n] [-s] resource-file<br />

alertID [parmi ... parm4]<br />

DESCRIPTION<br />

macquery is invoked by shell scripts or comm<strong>and</strong>s that do not<br />

directly use the Macintosh Toolbox but still need to present a<br />

Macintosh interface when asking the user simple questions or giving<br />

the user information. It is used to post an alert box that asks a<br />

question or supplies information. The alert box may include static<br />

text, icons, <strong>and</strong> QuickDraw pictures, but should not include<br />

check boxes, radio buttons, editable text fields, or other more complex<br />

controls. (See Chapter 13 of Inside Macintosh, Volume I, for<br />

more information about alerts <strong>and</strong> controls.) Typically, Apple's<br />

ResEdit utility is used to create alert resource definitions.<br />

The comm<strong>and</strong> that invokes macquery must supply a resource<br />

filename resource-file <strong>and</strong> the ID alertID of an alert resource<br />

defined in that file. The alert is posted exactly as it is defined in<br />

the resource, unless a flag option indicates that one of the st<strong>and</strong>ard<br />

alert icons should also be displayed in the alert box. (See Inside<br />

Macintosh, Volume I, for more discussion of the various types of<br />

st<strong>and</strong>ard alerts.)<br />

Up to four parameter strings may be included in the arguments.<br />

These replace the corresponding special strings '''0' through '''3'<br />

in the strings in the alert definition. (See the discussion of the<br />

ParamText call in Inside Macintosh, Volume I, for further discussion<br />

of parameter strings usage.)<br />

When the user chooses an enabled button, macquery closes the<br />

alert <strong>and</strong> exits. The exit status indicates which button the user<br />

chose (or that an error occurred). See the section "EXIT<br />

CODES" for more information.<br />

FLAG OPTIONS<br />

The following flag options are interpreted by macquery:<br />

1<br />

-t timeout<br />

Select the default button automatically if the user has not<br />

selected a button in the alert box after timeout seconds. The<br />

default button must be the first item in the alert definition <strong>and</strong><br />

is indicated visually by a bold outline.<br />

February, 1990<br />

Revision C

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!