Working with creator codes in OS X
Working with creator codes in OS X
- Subject: Working with creator codes in OS X
- From: Alexander Hertzog <email@hidden>
- Date: Sat, 25 Aug 2001 22:45:59 -0500
Hi everyone. I'm new to this list and new to AppleScript, so please
forgive me if this is just newbie stupidity.
I'm trying to create a script for OS X that will *remove* the creator
codes from a set of files. First I tried using the Finder selection as
the set of files to work with, but I didn't have much luck there, so I
took a cue from Apple's example scripts and just used the entirety of
the frontmost window as the set of files. Here's what I came up with.
try
tell application "Finder" to set the source_folder to (folder of
the front window) as alias
on error -- no open folder windows
set the source_folder to path to desktop folder as alias
end try
set the item_list to list folder source_folder without invisibles
repeat with i from 1 to number of items in the item_list
set the creator type of item i to ""
end repeat
I got the error message, "Can't use identifier type after identifier
creator" or words to that effect. So I removed the word "type" so the
line just read "set the creator of item..." This gave me the error
message, "Couldn't set creator of item 1 to """ and gave me a similar
error when I used " " (four spaces instead of nothing).
Does OS X handle Finder selections differently than OS 9? Does OS X
handle creator codes differently than OS 9?
Any help would be appreciated.
Thanks,
Alex