tell application "Finder" set file type of file "HD:Users:me:New Text Document.txt" to "TEXT" "TEXT" set creator type of file "HD:Users:me:New Text Document.txt" to "ttxt" "ttxt" end tell
And here's the event log for a custom one:
tell application "Finder"
set file type of file "HD:Users:me:New Text Document.txt" to "TEXT"
end tell
tell current application
display dialog "Finder got an error: Can't make some data into the expected type."
{button returned:"OK"}
end tellBoth tell the Finder to set the file type of a file to the same string, yet one causes an error while the other works fine.
Ahh it's driving me crazy, can someone explain why or how to fix this? I tried everything I could, including pulling out my trust 400-page AppleScript Language Guide to see if there were any classes other than string or text that might work...
[edit]oops wrong second link[/edit]
This post has been edited by PCheese: 25 February 2005 - 07:43 PM
Help



MultiQuote









