Name
choose file
Synopsis
file selection dialog
file selection dialog
Puts up a standard Open File dialog, with title "Choose File" and default button "Choose." You can add a prompt; you can set the initial folder displayed. You can specify whether invisible files should be shown, whether packages should be treated as folders, and what types of file to display (can be a list of either four-letter file type codes or UTIs—see http://developer.apple.com/macosx/uniformtypeidentifiers.html—but not both). Returns an alias.
Example
set f to choose file of type {"public.text"} without invisibles
Get AppleScript: The Definitive Guide, 2nd Edition 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.