• 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
"End of file error"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"End of file error"


  • Subject: "End of file error"
  • From: ScaryFish <email@hidden>
  • Date: Sat, 30 Dec 2000 09:01:48 +1300

My script needs to be able to read from and write to a simple text file. I
open the file for access and read the contents using:

open for access file "Hosts" of folder "Preferences" of folder "System
Folder" of startup disk
copy the result to thehostsfile
read thehostsfile

The wierd bit is once the script runs once ( My script also writes to the
file and sets the eof the file) and try to run again I get "Finder got an
error:End of file error".

The wierd bit is if I open the text file in simpletext, type a space, delete
the space and save it, then the script will run fine again. Once. If I
save the script as an application, it never works. Always gets "End of file
error"

Does setting the eof file somehow corrupt it to being opened by the script
again?

Please help.

Jason.


  • Follow-Ups:
    • Re: "End of file error"
      • From: nellA hciR <email@hidden>
    • Re: "End of file error"
      • From: Paul Berkowitz <email@hidden>
  • Prev by Date: Re: Quick Question (Internet Explorer - OpenURL, GetSource)
  • Next by Date: Re: "End of file error"
  • Previous by thread: Re: Quick Question (Internet Explorer - OpenURL, GetSource)
  • Next by thread: Re: "End of file error"
  • Index(es):
    • Date
    • Thread