• 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
Re: Open for access with write permission
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Open for access with write permission


  • Subject: Re: Open for access with write permission
  • From: "Nigel Garvey" <email@hidden>
  • Date: Fri, 23 Mar 2007 02:31:58 +0000

Michelle Steiner wrote on Thu, 22 Mar 2007 15:00:10 -0700:

>set fileRef to open for access UserFile with write permission
>
>-->  "File file Dora:Users:michelle:Desktop:en is already open."
>
>set eof of fileRef to (get eof of fileRef) + 1
>write additions to fileRef

Hi, Michelle.

You're setting eof greater than the length of the file. Try:

  set fileRef to open for access UserFile with write permission
  write additions to fileRef starting at eof
  close access fileRef

'eof' isn't the last byte in the file but the insertion point immediately
after it.


NG

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Prev by Date: Re: Doh!
  • Next by Date: Re: Scripting RagTime
  • Previous by thread: Re: Open for access with write permission
  • Next by thread: Doh!
  • Index(es):
    • Date
    • Thread