This converted text file was derived from a Mac HyperTalk - HyperCard Command DA. It's presented for reference use with HyperCard stack conversions needs from the Mac to the IIgs. That's all Folks :) MacProber ---------------------------------------- HyperTalk Commands add number to [chunk of] container Note: The container or chunk referred to must contain a number. The add command adds the value of number to the number in a container or chunk and replaces the contents of the container or chunk with the result. (You can use the is a operator to see if the container is a number.) ---------------------------------------- answer text answer text with reply1 answer text with reply1 or reply2 answer text with reply1 or reply2  or reply3 answer file text [of type fileType ] The answer command 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. The fileType option tells HyperCard to display 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. Answer file returns empty if the user clicks Cancel. ---------------------------------------- arrowKey direction If the global property textArrows is false, the arrowKey command navigates through cards: arrowKey left = go to previous card arrowKey right = go to next card arrowKey up = go forward through recent cards arrowKey down = go backward through recent cards ---------------------------------------- ask text1 [with text2 ] ask password [clear] text1 [with text2 ] ask file text1 [with fileName ] The ask command displays a question (text1 ) in a dialog box along with a text box where the user can type a reply. The ask dialog automatically provides the OK and Cancel buttons. You can supply a default reply using the with text2 option. The default text appears highlighted in the text box. Ask password displays bullets (¥) for each character the user types and encrypts the reply as a number. You can save this number in a field to compare with future passwords. (The ask password clear form does not encrypt the reply.) Note: ask password is different from setting the password of the stack with the Protect Stack dialog. With ask password, your handler must set and check any passwords. ---------------------------------------- beep beep posInteger The beep command sounds the Macintosh system beep. If you specify a posInteger, your Macintosh beeps that many times. ---------------------------------------- choose tool posInteger choose toolName tool ...where posInteger is between 1 and 18. The choose command selects the tool with the specified number or name from the Tools palette. HyperCard sends the choose command to the current card when you choose a tool from the Tools menu. ---------------------------------------- click at point click at point with key1 click at point with key1, key2 click at point with key1, key2, key3 The click at command provides a way of clicking the mouse from within your scripts. It acts exactly as if you had clicked the mouse on the screen. If point is within the rectangle of a button, a locked field, or anywhere else on the card, HyperCard sends the mouseDown, mouseStillDown, and mouseUp messages to the object. ---------------------------------------- close printing close file fileName close card window close externalWindow The close printing command ends a print job previously begun with an open printing command. The close file command closes a disk file previously opened with the open file command. Usually, you open files to import or export text. Always use close file when youÕre finished. The close card window command closes the current stack (unless itÕs the only open stack). HyperCard also sends the close command to the current card when the user clicks the close box of the card window. ---------------------------------------- commandKeyDown char The commandKeyDown command provides a way of sending a -key event from a handler. It acts exactly as if you had pressed at the same time as the specified character. HyperCard sends the commandKeyDown command to a field (if the insertion point is set) or the current card when the user presses a -key combination. The value passed to the parameter variable char corresponds to the key pressed. ---------------------------------------- controlKey posInteger The controlKey command has no built-in effect. HyperCard sends the controlKey command to the current card when a combination of the Control key and another key is pressed. ---------------------------------------- convert date to formatName  [and formatName ] convert [chunk of] container  to formatName [and formatName ] The convert command changes a value expressed as a valid date, time, or date and time format to another format. You can use the second formatName to convert a value to any two formats, usually a date and a time. ¥ dateItems, a comma-delimited list of seven positive integers equal to the following values: year, month, day, hour, minute, second, dayNumber ¥ date, which has one of three formats: [dayName,] monthName, day, year month/day/year month-day-year ¥ time, which has the following format: hour:minute[:second] [timeOfDay] where timeOfDay = am or pm. The format names date and time can be preceded by an optional adjective, which produce formats as shown: abbrev date Fri, Jun 15, 1990 long date Friday, June 15, 1990 short date 6/15/90 ---------------------------------------- create menu menuName create stack fileName [with bkgnd ]  [in a new window] The create menu command makes a new menu and adds it to the menu bar. HyperCard displays an error message if you try to create a menu that already exists. Use the put command to add menu items to the new menu. ---------------------------------------- debug checkPoint The debug checkPoint command sets a permanent checkpoint in a handler. When HyperCard runs a handler, the debug checkpoint command causes HyperCard to enter the debugger; it pauses execution of the handler and open a script editor window with a box around the line with the checkpoint. ---------------------------------------- delete chunk of container delete [menuItem of] menu delete [menuItem from] menu The delete command removes text from a container, removes menu items from a menu, or removes menus from the menu bar. Note: Using delete to delete a line is not the same a putting empty into the line: delete removes the final return character as well as the text, while putting empty into the line just removes the text. ---------------------------------------- dial posInteger dial posInteger with modem dial posInteger with [modem]  [modemCommands ] The dial command generates touch-tone sounds for the digits in posInteger through the Macintosh speaker. To dial the phone from HyperCard, you must either hold the handset up to the speaker of your Macintosh or use a device that feeds Macintosh audio output to the telephone. ---------------------------------------- disable menu disable menuItem of menu The disable command allows you to dim menu items and entire menus. ItÕs a shortcut for setting the enabled property of a menu item or a menu to false. Users cannot choose dimmed menu items. ---------------------------------------- divide [chunk of] container by number Note: The container or chunk referred to must contain a number. The divide command divides the number in the container or chunk by number and puts the result into the container. Dividing by 0 places INF (for infinity) into the chunk or container. Division is carried out to a precision of up to 19 decimal places. ---------------------------------------- doMenu itemName [without dialog] doMenu itemName, menuName  [without dialog] The doMenu command performs the action specified by the item name and menu name just as if the user choses the item directly from the menu. The without dialog option bypasses the confirmation dialog box that would normally appear after the commands Delete Stack and Convert Stack, and, when a background field is selected, after Cut Field and Clear Field. ---------------------------------------- drag from point to point drag from point to point with key1 drag from point to point  with key1, key2 drag from point to point  with key1, key2, key3 The drag command performs the same action just as if the user drags the mouse manually, except that in order to select text in a field with the drag command, you must use the with shiftKey option. ---------------------------------------- edit [the] script of object The edit script command opens the script of an object with the HyperCard script editor. When run as a statement in a handler, edit script suspends execution of the handler until the user closes the script editor or activates the card window. ---------------------------------------- enable menu enable menuItem of menu The enable command activates menu items or entire menus that are inactive (dimmed). ItÕs a shortcut for setting the enabled property of a menu item or a menu to true. The enable command only enables items in HyperCardÕs menus that are currently available to the user. ---------------------------------------- enterInField The enterInField command saves the results of any changes the user or a handler makes to a field and closes the field (after which HyperCard sends a closeField message if the user made changes to the text or exitField if the user did not make any changes). HyperCard sends the enterInField command to a field when the user presses Enter and the insertion point is in the field. ---------------------------------------- enterKey The enterKey command sends a statement typed into the Message box to the current card. HyperCard sends the enterKey command to the current card when the user presses the Enter key, unless the insertion point is in a field, in which case HyperCard sends enterInField instead. ---------------------------------------- export paint to file fileName The export paint command saves a Paint image of the current card to the specified file. Export paint only works when one of the Paint tools is chosen. This command has the same effect as the Export Paint menu item that appears in the File menu (when a Paint tool is chosen), except that it avoids the dialog box that prompts the user for a file name. ---------------------------------------- find text [in field ] [of marked cards] find chars text [in field ]  [of marked cards] find word text [in field ]  [of marked cards] find whole text [in field ]  [of marked cards] find string text [in field ]  [of marked cards] The find command searches for a text string in all the card and background fields (visible or not) of the current stack. There are two types of find commands. The commands find, find chars, and find word treat each word of the search string as a separate search item. For example, find "this command" is treated as find "this" and find "command". The search succeeds if HyperCard finds all the words of the search string anywhere on the card (or anywhere in the specified field). The words do not have to be in order. ---------------------------------------- functionKey posInteger Note: posInteger must yield a number between 1 and 15. The functionKey command performs an undo, cut, copy, or paste for the values 1 through 4. Integer values 5 through 15 have no built-in effect. HyperCard sends the functionKey command to the current card when the user presses one of the function keys on the Apple Extended Keyboard. ---------------------------------------- get expression get [the] property [of object ] The get command puts the value of any expression or property into the local variable it. That is, get expression is the same as put expression into it ---------------------------------------- go [to] ordinal go [to] position go [to] card [of bkgnd ] [of stack ] go [to] bkgnd [of stack ] go [to] stack go [to] [card of] [bkgnd of ] stack  [in a new window] [without dialog] The go command takes the user to a card in a stack. The ordinal and position forms take the user to a card in the current stack. The in a new window option tells HyperCard to open a stack in another window when it goes to the stack. You can have up to 18 stack windows, depending on the available memory. When HyperCard canÕt open the stack in a new window (either 18 stack windows are open or thereÕs not enough memory), it sets the result to "Too many windows open." ---------------------------------------- help The help command goes to the first card of the HyperCard Help stack. HyperCard sends the help command to the current card when the user chooses Help from the Go menu (or presses -?). Note: The command go help is equivalent to go stack "help", while the help command tries to go to the HyperCard Help stack. ---------------------------------------- hide menuBar hide titleBar hide groups hide card picture hide background picture hide picture of card hide picture of bkgnd hide field hide button hide window hide externalWindow The hide groups command removes the two-pixel gray underline displayed for all text that has the ÒgroupÓ text style. The underline only appears after a show groups command. For graphics, the hide command removes the card or background picture from view. ItÕs the same as setting the showPict property of the card or background to false. ---------------------------------------- import paint from file fileName The import paint command loadsa Paint image to the current card from a file. Import paint only works when one of the Paint tools is chosen. This command has the same effect as the Import Paint menu item that appears in the File menu (when a Paint tool is chosen), except that it avoids the dialog box that prompts the user for a file name. ---------------------------------------- keyDown char The keyDown command provides a way of sending a key event from a handler. It acts exactly as if the user pressed the char from the keyboard. HyperCard sends the keyDown command to a field (if the insertion point is set) or the current card when the user presses a key. The value passed to the parameter variable char corresponds to the key pressed. ---------------------------------------- lock screen The lock screen command has the same effect as setting the property lockScreen to true: it prevents HyperCard from updating the screen. Within handlers, use lock screen with the unlock screen command to perform actions (such as going to other cards) without the user seeing them. Locking the screen also helps handlers to run faster. ---------------------------------------- mark all cards mark card mark cards where trueOrFalse mark cards by finding text [in field ] mark cards by finding chars  text [in field ] mark cards by finding word  text [in field ] mark cards by finding whole  text [in field ] mark cards by finding string  text [in field ] ---------------------------------------- multiply [chunk of] container  by number Note: The container or chunk referred to must contain a number. The multiply command multiplies the number in the container or chunk by number and puts the result into the container or chunk. The result is calculated to a precision of up to 19 decimal places. ---------------------------------------- open application open fileName with application The open command launches another application program or opens a document with another application from within HyperCard. You must provide the full pathnames for the files if theyÕre not at the same directory level as HyperCard. HyperCard sends the suspend system message to the current card before turning over control to the application. ---------------------------------------- open file fileName The open file command opens the specified file so that you can read data from it and write to it. Usually, the file is an ASCII text file opened to allow importing or exporting text. If the file doesnÕt exist, HyperCard creates it. If the file is already open, HyperCard displays an error message. Use the close file command to close files after youÕve opened them. ---------------------------------------- open printing [with dialog] The open printing command begins a print job. It uses the current settings from the Print Stack dialog box. If you specify the with dialog option, HyperCard displays the Print Stack dialog box and the user can choose new settings. HyperCard sets the function the result to "Cancel" if the user clicks Cancel; otherwise, it sets the result to empty. ---------------------------------------- open report printing open report printing with dialog open report printing  with template text where text is the name of a report template in the current stack. The open report printing command begins the process of printing a stack (or part of a stack) as a report. It uses the current settings from the Print Report dialog box. You must use the close printing command to end the job begun with open report printing. ---------------------------------------- play stop play sound play sound notes play sound tempo posInteger play sound tempo posInteger notes The play command plays a sound or a series of notes using a sound through the speaker of the Macintosh (or through the audio jack if itÕs in use). Play stop stops the current sound immediately; otherwise the sound plays until itÕs done and stops by itself. Name one of these letters: a, b, c, d, e, f, g, r (where r = rest) Accidental one of these characters: #, b Octave a positive integer (4 is middle C) Duration one of the letters: w, h, q, e, s, t, x where w = whole note h = half note q = quarter note Specify the note r to get a rest. For example: re --eighth note rest rq --quarter note rest A duration followed by a period (.) means a dotted note. A duration followed by the number 3 means one note of a triplet. ---------------------------------------- pop card pop card into [chunk of] container pop card after [chunk of] container pop card before [chunk of] container The pop card command retrieves the identification (full card ID and stack pathname) of a card previously saved with the push card command. If you donÕt provide a container to hold the card information, pop goes directly to the popped card. ---------------------------------------- print card [from point1 to point2 ] print all cards print marked cards print posInteger cards print card [from point1 to point2 ] print field print fileName with application print expression The print command allows you to print card images, the contents of fields, documents from other programs, or the value of any HyperTalk expression. Print posInteger cards prints a range of consecutive cards starting from the current card. Print card prints the card specified by the card expression. The option from point1 to point2 specifies a rectangular area of the card to print. HyperCard sets the function the result to "No such card." if the specified card doesnÕt exist; otherwise, the result returns empty. If HyperCard canÕt find the document or application, it displays a directory dialog box and asks the user to find them. HyperCard also sets the function the result to "Cancel" if the user clicks Cancel in the dialog box. Otherwise, it sets the result to empty. If HyperCard has problems opening the application (for example, thereÕs not enough memory), it sets the result to "Couldn't open that application." ---------------------------------------- push card push card [of stack ] push bkgnd [of stack ] push stack The push command saves the identification of a card in HyperCardÕs memory. If you specify a background or stack, HyperCard stores the location of the first card of the background or stack. In all cases, HyperCard saves the full card ID and the path name for the stack. ---------------------------------------- put expression put expression preposition  [chunk of] container put menuItemList preposition  [menuItem of] menu  [with menuMessages messageList ] The put command causes HyperCard to evaluate an expression and place the result into, after, or before the contents of a container. To add items to a menu, you first have to create the menu with the create command. (Click Related Topics for more information about create). The menuItemList is a comma-separated list of the items you want to add to the menu. Use the single character "-" to get a gray line. You can only put 64 menu items into a menu. ---------------------------------------- read from file fileName until char read from file fileName  for posInteger The read command reads data from a file. (You must have already opened the file with the open file command.) Read places the data into the local variable it. Reading starts from the beginning of a newly opened file and continues from the last point read with each succeeding read command. ---------------------------------------- reset menuBar reset printing reset paint Reset menuBar restores the menu bar to HyperCardÕs standard menus. Reset printing restores the default values for the printing properties, as follows: ---------------------------------------- printMargins: 0,0,0,0 printTextAlign: left printTextFont: Geneva printTextHeight:13 printTextSize: 10 printTextStyle: plain ---------------------------------------- returnInField The returnInField command places a return character at the position of the insertion point in a field. If the autoTab property of the field is true and the insertion point is on the last line of the field, the returnInField command does not insert a return character, but instead sends the tabKey command to the field. ---------------------------------------- returnKey The returnKey command sends a statement typed into the Message box to the current card. HyperCard sends the returnKey command to the current card when the user presses the Return key, unless the insertion point is in a field, in which case HyperCard sends returnInField instead. ---------------------------------------- save [this] stack as [stack] fileName save stack fileName  as [stack] fileName The save command saves a copyof a stack. ItÕs the same as choosing Save A Copy from the File menu, but it does not display directory dialog box. Use save when you do not want a dialog box to interrupt a handler. ---------------------------------------- select empty select button select field select text of container select before text of container select after text of container select chunk of container select before chunk of container select after chunk of container ...where container must be a field or the Message box; it cannot be a variable. Select empty removes the current selection. Use select empty instead of click at to deselect text or objects. Select text applies to all the text in a field or in the Message box. You can select all the text or place the insertion point before the first character or after the last character of text. ---------------------------------------- set [the] property to expression set [the] property of object  to expression set [the] property of window  to expression set [the] property of [menuItem of]  menu to expression set [the] property of chunk  of field to expression Note: expression must yield a valid setting for the specified property. ---------------------------------------- show menuBar show titleBar show groups show all cards show marked cards show posInteger cards show card picture show background picture show picture of card show picture of bkgnd show field [at point ] show button [at point ] Show groups displays a two-pixel gray underline for all text that has the ÒgroupÓ text style (by default, the ÒgroupÓ text style is invisible). The underline appears for grouped text in every field (in all stacks). Use the hide groups command to remove the underline. The show card forms display the specified cards in the current stack in turn, beginning with the next card or the next marked card. ---------------------------------------- sort [sortDirection ] [sortStyle ]  by expression sort [this] stack [sortDirection ]  [sortStyle ] by expression sort [marked] cards [of this stack]  [sortDirection ] [sortStyle ]  by expression sort bkgnd [sortDirection ]  [sortStyle ] by expression sort [marked] cards of bkgnd  [sortDirection ] [sortStyle ]  by expression The last form of the sort command sorts a container by its lines or items. If you donÕt specify a chunk, sort orders the container by lines. For all forms of the sort command, the default sort direction is ascending and the default sort style is text. The sort direction ascending orders the sort elementsÑthe value of the expression on each card or the lines or items in the containerÑfrom lower to higher values. The sort style numeric correctly sorts numbers. With sort style text, "1" < "100" < "17" < "2". The sort style numeric correctly sorts these values as: "1" < "2" < "17" < "100". ---------------------------------------- start using stack The start using command inserts the specified stack into the message-passing order between the current stack and the Home stack (or between the current stack and any other stacks being used). Handlers in the stack script of the newly inserted stack may now intercept messages as they move through the message-passing order. ---------------------------------------- stop using stack The stop using command removes a stack from the message-passing order. Handlers in the stack script of the removed stack will no longer be available from the current stack. ---------------------------------------- subtract number from [chunk of]  container Note: The container or chunk referred to must contain a number. The subtract command subtracts the number in the container or chunk by number and puts the result into the container. (You can use the is a operator to see if the container is a number.) ---------------------------------------- tabkey The tabKey command opens the first unlocked field on the current card or background (placing the insertion point in the field) and selects its entire contents. If a field is already open for editing, tabKey closes it and opens the next editable field, selecting its contents. (A field is editable only if it is unlocked and visible.) ---------------------------------------- type text type text with commandKey The type acts exactly as if the user had typed the text (or a single character) from the keyboard. The text appears in the Message box when itÕs visible (or also when itÕs hidden if blindTyping is set to true). To type text into a field, a handler must first set the insertion point (using either the select or click at commands). ---------------------------------------- unlock screen unlock screen with effect [speed ]  [to image ] unlock screen with visual [effect]  effect [speed ] [to image ] The unlock screen command has the same effect as setting the property lockScreen to false: It allows HyperCard to update the screen after a lock screen command. (Click the placeholders effect, speed, and image to see their possible replacements.) ---------------------------------------- unmark all cards unmark card unmark cards where trueOrFalse unmark cards by finding  text [in field ] [of marked cards] unmark cards by finding chars  text [in field ] [of marked cards] unmark cards by finding word  text [in field ] [of marked cards] unmark cards by finding whole  text [in field ] [of marked cards] unmark cards by finding string  text [in field ] [of marked cards] ---------------------------------------- visual [effect] effect [speed ]  [to image ] The visual command specifies a visual effect for HyperCard to use as it moves from one card to another. (Click the placeholders effect, speed, and image to see their possible replacements.) Visual must be followed by a go command to have any effect. The optional speed paramater tells HyperCard to perform the visual effect faster or slower than normal. ---------------------------------------- wait [for] posInteger [ticks] wait [for] posInteger seconds wait until trueOrFalse wait while trueOrFalse The wait command causes HyperCard to pause before executing the rest of a handler, either for a specific length of time, until a specified condition becomes true, or while a specified condition remains true. --------------------------------------- -end of converted text file-