Another script to analyize, please
Another script to analyize, please
- Subject: Another script to analyize, please
- From: Michelle Steiner <email@hidden>
- Date: Thu, 4 Dec 2003 08:53:47 -0700
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
--
Give Peace A Chance.
_______________________________________________
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.