Re: Another script to analyize, please
Re: Another script to analyize, please
- Subject: Re: Another script to analyize, please
- From: Deivy Petrescu <email@hidden>
- Date: Sun, 14 Dec 2003 15:14:00 -0500
At 8:53 AM -0700 12/4/03, Michelle Steiner wrote:
set docpath to choose file name
set thedoc to open for access docpath with write permission
close access thedoc
tell application "Finder"
set file type of file docpath to "GIFf"
set the file creator of file docpath to "GKON"
end tell
If I leave out "file" in setting the file type
or file creator, I get a stack overflow, but
with the word file there, the log shows
set file type of file (file
"Dora:Users:michelle:Desktop:untitled") to "GIFf"
"GIFf"
set file creator of file (file
"Dora:Users:michelle:Desktop:untitled") to "GKON"
It seems to me that "file" is redundant.
Further, although file type works, when the
script reaches the file creator line, it throws
this error:
"Finder got an error: Can't set
file creator of file (file
\"Dora:Users:michelle:Desktop:untitled\") to
\"GKON\"."
Oh, I was trying to change file type and creator
as an experiment; I realize that I can't convert
a text document to a GIF quite so easily.
Michelle;
This works as you want:
set docpath to choose file
tell application "Finder"
set file type of docpath to "GIFf"
set the creator type of docpath to "GKON"
end tell
Regards
Saudagues
Deivy
http://www.dicas.com
--
_______________________________________________
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.