howdy all,
i am trying to make a drag-n-drop script that will change the file/creator type for the dropped file chosen from a list by the user. the list part works fine, but change part doesn’t. i get the error “can’t make some data into the expected type.”
what am i missing?!
here’s what i’ve got; i truncated the choices down to one for this example:
property FileType : ""
property CreatorType : ""
on open theFiles
tell application "Finder"
activate
set pickProgram to choose from list {"Plain TXT"} with prompt ¬
"What kind of file should this be?"
set button_name to pickProgram
if button_name is "Plain TXT" then
set FileType to "ttxt"
set CreatorType to "TEXT"
end if
repeat with eachFile in theFiles
set the file type of eachFile to FileType
set the file creator of eachFile to CreatorType
end repeat
end tell
end open
thanks in advance for any help!
ray.