Re:Creator types as Class and I can't coerce it back
Re:Creator types as Class and I can't coerce it back
- Subject: Re:Creator types as Class and I can't coerce it back
- From: Paul Skinner <email@hidden>
- Date: Fri, 11 May 2001 17:35:30 -0400
OK,
The following script returns Creator Types as a list of values like
so...
<<class 'the 4 letter creator type'>>.
tell application "Finder"
set t to {name, creator type} of (every file of folder <optL>
"dark star:System Folder:Scripting Additions:" whose kind is <optL>
"application program")
-->{{"AirPort Scripting", "Keychain Scripting", "Network Setup
--Scripting", "Sound Scripting", "Speech Listener", "URL Access Scripting",
--"propertyserver"}, {+class 1wse;, +class kscr;, +class ntex;, +class
--sscr;, +class srls;, +class uasc;, +class aplt;}}
end tell
And trying to coerce them to text doesn't seem to work. It appears that
I can't coerce them to anything else at all.
The following script returns the Creator Type as text. Now obviously the
method that I'm using in the first script induces the types to be returned
as classes, but why? Does anyone know the reason. Perhaps then, I could code
around this behavior.
tell application "Finder"
creator type of file "dark star:System Folder:Scripting <optL>
Additions:AirPort Scripting"
-->"1wse"
end tell
--
Paul Skinner