• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Choose a file dialog box?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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. |
----------------------------------------------------------------------


  • Prev by Date: Re: Two Questions
  • Next by Date: download URL
  • Previous by thread: Choose a file dialog box?
  • Next by thread: Re: Choose a file dialog box?
  • Index(es):
    • Date
    • Thread