• 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: Scripting Additions 'Read' has stopped reaching EOF?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Additions 'Read' has stopped reaching EOF?


  • Subject: Re: Scripting Additions 'Read' has stopped reaching EOF?
  • From: Chap Harrison <email@hidden>
  • Date: Mon, 26 Jan 2004 16:24:50 -0600

Does "freshly recreated" mean "a brand new file with a different name" or
"a rewrite of the old file"? If the latter, does the saving routine set
the file's eof to 0 before writing new data to the file? Your symptoms
might arise if you were writing shorter data to an existing file, because
the end of the old data would still be there beyond the end of the new.
By zeroing the eof first, you effectively "delete" any existing data and
the end of the file will then come at the end of the new data.

I think you are on to something!

Freshly created means a rewrite of the old file. The name & path never change.

set gFid to (open for access gTempPath with write permission)

Prior to this I delete the file - as follows...

do shell script ("/bin/rm -f " & POSIX path of gTempPath)

Betcha that going behind Applescript's back on the delete like that was a bad idea. (I did that much earlier when I didn't think I could trust AS to do *anything* right - or at least, to do anything I expected it to do. :)

I'll find an Applescripty way to delete it (or maybe just reset EOF as you suggest).

Thanks,
Chap
_______________________________________________
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: Scripting Additions 'Read' has stopped reaching EOF?
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: Scripting Additions 'Read' has stopped reaching EOF? (From: Nigel Garvey <email@hidden>)

  • Prev by Date: GUI - radio button "Clock"
  • Next by Date: Re: Multiline awk needs debugging
  • Previous by thread: Re: Scripting Additions 'Read' has stopped reaching EOF?
  • Next by thread: Re: Scripting Additions 'Read' has stopped reaching EOF?
  • Index(es):
    • Date
    • Thread