Re: Choose file
Re: Choose file
- Subject: Re: Choose file
- From: Bill Briggs <email@hidden>
- Date: Wed, 1 Mar 2006 12:52:11 -0400
At 9:55 AM -0600 3/1/06, Luther Fuller wrote:
>I've been trying to get this command to work properly.
>
> "Choose an audio file (AIFF, MPG3, M4A , WAVE) to play ..."
> choose file with prompt the result of type typeList without invisibles
>
>If typeList is an empty list, I can choose the files I want, but I can also choose any type of file.
>If typeList contains any item, then the choose file dialog does not allow me to choose anything.
>What I want is a correct response for the typeList = {"aif", "aiff", "mp3", "wav"}.
>
>Is there a bug here that I should know about?
Well, it's a question of what "type" means. If you run this:
choose file with prompt "Pick a file" of type {"public.mp3"}
A few months back I posted a way to determine what those types are.
If you select the kind of file you're interested in (frontmost Finder window) then run this.
tell application "Finder"
set a_file to selection as alias
set UTI to type identifier of (get info for a_file)
end tell
and use the result you get in your type list, you'll be able to do what you want.
- web
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
References: | |
| >Choose file (From: Luther Fuller <email@hidden>) |