• 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: file types and UTIs don't mix in choose file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file types and UTIs don't mix in choose file


  • Subject: Re: file types and UTIs don't mix in choose file
  • From: Emile Schwarz <email@hidden>
  • Date: Tue, 30 Aug 2005 11:17:43 +0200

The dictionary description is ... misleading:

<quote>
[of type list of string] : a list of file types or type identifiers. Only files of the specified types will be selectable.
</quote>


The following script does not works (filter everything; you can't select a file):

tell application "Finder"
	choose file of type {"TEXT"} -- It’s a file type
end tell

but that one works fine... (well, sort of):

tell application "Finder"
	choose file of type {"TEXT", "ttro"} -- file type _AND_ file creator
end tell


I was surprised when I first read Matt message... then I re-read it a second time, a third time, run Script Editor to write a piece of code and this message...



So, Matt, for me it is clearly a bug (either in the documentation and in running the script.


BUT, change the documentation and... it’s a feature ;)


At last, on my nth time reading of your mail, I will love to been able to mix both technologies, but the URI (IMHO) will replace file type, file creator, so the dream is over.


Put black liquid paint with white liquid paint in the same can/box does not gives black and white paint: some grey flavor will result ;)


Emile


email@hidden wrote:
Date: Sun, 28 Aug 2005 18:00:50 -0700
From: Matt Neuburg <email@hidden>
Subject: file types and UTIs don't mix in choose file
To: <email@hidden>
Message-ID: <BF37AC52.DF59%email@hidden>
Content-Type: text/plain;	charset="US-ASCII"

In choose file, I'd like to specify a wide range of types. If I say
{"public.plain-text"} I can get a pretty wide range, but not old SimpleText
read-only docs. If I say {"public.plain-text", "ttro"} it doesn't work. If I
say {"TEXT", "ttro"} it does work. From this I conclude that if you try to
mix UTIs and four-letter file types you get your hand slapped. Is this a
bug? m.



_______________________________________________ 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: file types and UTIs don't mix in choose file
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Scripting XCode with Applescript
  • Next by Date: Re: Scripting XCode with Applescript
  • Previous by thread: Re: file types and UTIs don't mix in choose file
  • Next by thread: Re: file types and UTIs don't mix in choose file
  • Index(es):
    • Date
    • Thread