Name

choose file — file selection dialog

Description

Puts up a standard Open File dialog, with title “Choose File” and default button “Choose”. Returns an alias. If the user cancels, an error is thrown (-128: “User canceled.”)

Example

set f to choose file with prompt "Pick a text file:" of type "TEXT"

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.