• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Another script to analyize, please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Another script to analyize, please
      • From: Deivy Petrescu <email@hidden>
    • Re: Another script to analyize, please
      • From: Paul Berkowitz <email@hidden>
    • Re: Another script to analyize, please
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Setting an Icon of new folder....
  • Next by Date: Re: Panther Font Mania (was Quark 6 Font Mess)
  • Previous by thread: Re: Setting an Icon of new folder....
  • Next by thread: Re: Another script to analyize, please
  • Index(es):
    • Date
    • Thread