Name

Standard Additions

Dictionary commands

adding folder items to alias

This is a Folder Action command covered in Section of Chapter 26.

ASCII character integer

This command returns the ASCII character associated with the number provided as a parameter. For example, ASCII character 80 returns the string “P.”

ASCII number integer

You can find the ASCII number of a character by using code, such as ASCII number "P" (this returns an integer of 80).

beep integer

This makes the beep sound integer number of times, or once if a parameter is not included.

choose application

This command opens the choose application dialog box, which only lists the programs running at the moment. Figure A-3 shows this dialog. Figure A-4 shows what this dialog looks like in the OS X release. The following example lists the running applications, then opens the user’s choice. Note that choose application also displays faceless background applications that the user cannot interact with (they can quit some of these apps, however).

The OS 9 choose application window
Figure A-3. The OS 9 choose application window
The choose application window in OS X
Figure A-4. The choose application window in OS X
try -- capture error if they choose a 'background only' app tell (choose application application label "Choose one program"¬ with prompt "Here are the running applications") to activate ...

Get AppleScript in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.