Re: Choose a file dialog box?
Re: Choose a file dialog box?
- Subject: Re: Choose a file dialog box?
- From: Michelle Steiner <email@hidden>
- Date: Wed, 14 Feb 2001 07:20:25 -0800
On 2/14/01 1:40 AM, Simon Forster <email@hidden> wrote:
>
In the near future I'll be looking to write an AppleScript which'll ask a
>
user to select a file. How do I get an appropriate dialog box to show?
It's built in to the standard additions OSAX. Here's the information
from the dictionary:
choose file: Choose a file on a disk or server
choose file
[with prompt string] -- a prompt to be displayed in the file chooser
[of type list] -- restrict the files shown to only these file types
(up to 4)
Result: alias -- to the chosen file
So, a script to allow someone to choose a JPG file would be something
like this:
set the chosenFile to choose file with prompt "Choose the file to open"
of type {"JPEG"}
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spirtual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------