Krazay
October 6, 2004, 3:32am
#1
Hi everyone! Here after doing this problem of mine more than once I have amost exhausted myself trying to find out why this is not working…
tell application "Finder"
set thePath to (choose file)
set curFileCreator to file creator of thePath
set curFileType to file type of thePath
end tell
All I want to know is the file type and creator of some files so I can set all of them thru a script.
Thanks!
Krazay :rolleyes:
kel
October 6, 2004, 4:38am
#2
Hi,
‘file creator’ is a label used in the record returned from the ‘info for’ command. The Finder uses ‘creator type’.
gl,
Krazay
October 6, 2004, 7:07am
#3
Thanks kel,
But when I try this applescript it goes into error…
tell application "Finder"
set thePath to (choose file)
set curFileCreator to file creator of thePath
set curFileType to file type of thePath
end tell
Applescript Error
Finder got an error : Can’t find creator of alias (what ever path I choose)
So strange… I thought I able to do this before with this problem.
krazay
Krazay
October 6, 2004, 8:39am
#4
You can use the Finder to get the creator or file types – provided they exist
Code:
tell application “Finder”
set x to get file type of (choose file)
set y to get creator type of (choose file)
return x & space & y
end tell
I tried the above and it errored out the same way. When I went back to my script it highlited file type. This use to work a while back with no problems.
Krazay
kel
October 6, 2004, 11:19am
#5
Hi,
Maybe you should show your script and the error message. Your posts don’t sound right.
gl,
Krazay
October 6, 2004, 7:41pm
#6
tell application “Finder”
set x to get file type of (choose file)
set y to get creator type of (choose file)
return x & space & y
end tell
AHHHHH! This is really weird. I have my home folder encrypted and I just tried the same code in another user, and it works… why does this not work in an encrypted enviroment?
Phreak
October 8, 2004, 1:07am
#7
probally because for lots of files, or to make new files, you have to give it an administrator password and you didn’t tell it the admin password.