Note: This is a work in progress and many formatting issues have been fixed. Read more about the project on the home page.
The form answer text
displays a question (text
) in a dialog box. The dialog box contains from one to three buttons, each representing a different reply the user can select.
If you use answer
without specifying any replies, HyperTalk displays an OK button as the default. Otherwise, the last reply you specify becomes the default button. (Pressing Enter or Return chooses the default button.) Answer
returns the name of the button clicked by the user in the local variable it
.
Answer
automatically sizes the dialog box to fit the size of the text (up to 13 lines). The total length of the text cannot exceed 254 characters.
The form Answer file text
displays a directory dialog box that you use to select a file.
answer file text of type fileType
displays only files of a specified type: application
, picture
, painting
or paint
, stack
, or text
. (Click the fileType placeholder for more information about file types.)
Answer file
returns the full pathname of the selected file in the local variable it
. It returns empty if the user clicks Cancel.
Answer file
also sets the result
to Cancel
if the user clicks Cancel. Check the value of the result
in the statement immediately following answer file
.
The form Answer program text
produces a dialog box of all System 7-friendly processes currently running on the local machine and on any networked computers to which the local machine has access.
A System 7-friendly process is a program or entity that’s capable of exchanging information with another process. The name of the selected program is placed in the container it
.
text
is a quoted prompting string that appears at the top of the dialog box. If you provide the null string for text
(that is, ""
), the system puts Choose a program to link to:
at the top of the dialog box.
Use the form answer program text of type processType
to see only certain types of processes (spell checkers, word processors, spreadsheets, and so on).
An application's default process type is its creator. So to see only copies of HyperCard, you’d use WILD.
For more details, see "PPC Toolbox" in Inside Macintosh V.6 or Inside Macintosh: Interapplication Communications.
An expression that evaluates to a text string.
A text expression can be a literal string surrounded by quotation marks or the value of a container.
For example:
See also: background, bkgnd, button, card, field, menu, menuItem,
and stack
HyperTalk Definition
AppleScript Definition
An expression that evaluates to a file type recognized by the application receiving a command.