Name

choose application — application selection dialog

Description

Puts up a standard Choose Application dialog. The user can choose from a list of all applications, or can switch to browsing in a standard Open File dialog. Returns an application specifier, or an alias if requested; or a list of either, if multiple selections are allowed. If the user cancels, an error is thrown (-128: “User canceled.”)

Example

set theApp to choose application as alias
tell application "Finder"
        set isScriptable to has scripting terminology of theApp
end tell
if isScriptable then display dialog "It's scriptable!"

Get AppleScript: The Definitive Guide 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.