Re: Can't set creator type
Re: Can't set creator type
- Subject: Re: Can't set creator type
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 23 Feb 2004 18:01:57 -0800
On 2/23/04 5:39 PM, "Mr Tea" <email@hidden> wrote:
>
>
The above is based on a snippet from a much longer script that worked in
>
Jaguar but fails in Panther. No matter what I do to try and coerce the
>
contents of 'theCode' into a form that works, the script fails on the line
>
'set creator type of f to theCode', returning a -1700 'can't make some data
>
into the expected type' error. If I simply do 'set theCode to "asDB"' (or
>
similar) before setting the creator type of the file, no problem, but when
>
the value of theCode is the text returned from a dialog, no dice
>
(AppleScript's own dialogs and the 24U Appearance variety both return this
>
error. I tried using System Events to set the file's creator type instead,
>
but that returned an 'NSDontUnderstandWhatThisMeans' error.
>
>
Can anyone tell me what's going wrong?
'text returned' may be Unicode now. 'creator type' has to be real plain
text. Use the <<class ktxt>> of (text returned of dRes) as record' method
to get the plain text.
Also, why are you converting the Finder reference to alias if you plan to do
further Finder operations (getting and setting creator type)? It doesn't
hurt, but it's fine without too.
(Also, why keep getting 'text returned' over and over, since you're not
getting any other property. Why not just set a variable to it once and for
all?)
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.