• 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
Problem with simple finder script- make new file, open for access
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with simple finder script- make new file, open for access


  • Subject: Problem with simple finder script- make new file, open for access
  • From: Dan Doughtie <email@hidden>
  • Date: Mon, 31 Jul 2006 18:52:42 -0400
  • Thread-topic: Problem with simple finder script- make new file, open for access

Running 10.4.7. I've used this format forever. No problems. Now when I run
this I get "Finder got an error: Can't make file (document file "SPT
080106-Trinity Cat-67448" of folder "Desktop" of folder "dandough" of folder
"Users" of startup disk) into type file specification."

It creates an empty file then hoses when if tried to open it.

tell application "Finder"
    set MyFile to make new file at desktop with properties
{name:DoStoryName(winningTeam) of me}
    open for access file MyFile with write permission
    write AGATE to file MyFile starting at eof
    close access file MyFile
end tell

I finally got it to work but only by saying

tell application "Finder"
    set MyFile to make new file at desktop with properties
{name:DoStoryName(winningTeam) of me}

Set MyFile to MyFile as alias

    open for access MyFile with write permission
    write AGATE to MyFile starting at eof
    close access MyFile
end tell

Is this related to a desktop reference bug?


Dan

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problem with simple finder script- make new file, open for access
      • From: Emmanuel <email@hidden>
    • Re: Problem with simple finder script- make new file, open for access
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Filemaker 8.5 and current record syntax
  • Next by Date: Re: Problem with simple finder script- make new file, open for access
  • Previous by thread: Re: Filemaker 8.5 and current record syntax
  • Next by thread: Re: Problem with simple finder script- make new file, open for access
  • Index(es):
    • Date
    • Thread