• 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 file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Choose file


  • Subject: Re: Choose file
  • From: Christopher Nebel <email@hidden>
  • Date: Wed, 1 Mar 2006 15:55:08 -0800

On Mar 1, 2006, at 8:47 AM, kai wrote:

On 1 Mar 2006, at 15:55, 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?

A filename extension isn't quite the same as file type or type identifier, Luther. Try either one or the other:


choose file of type {"AIFF", "MPG3"} without invisibles

choose file of type {"public.aifc-audio", "public.mp3", "com.microsoft.waveform-audio"} without invisibles

If you really meant specifically AIFF, MPG3, M4A, or WAVE, then kai's solution is correct. However, if you merely wanted some kind of audio file (i.e., something QuickTime Player could open), then using the generic type "public.audio" would be more appropriate. You can find a list of system-defined types at <http://developer.apple.com/ documentation/Carbon/Conceptual/understanding_utis/utilist/ chapter_4_section_1.html>.



--Chris Nebel AppleScript and Automator Engineering

_______________________________________________
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


  • Follow-Ups:
    • Re: Choose file
      • From: Sander Tekelenburg <email@hidden>
References: 
 >Choose file (From: Luther Fuller <email@hidden>)
 >Re: Choose file (From: kai <email@hidden>)

  • Prev by Date: Re: Choose file
  • Next by Date: Re: Creating MacBinary files: command line or AScript tools?
  • Previous by thread: Re: Choose file
  • Next by thread: Re: Choose file
  • Index(es):
    • Date
    • Thread