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

Re: "End of file error"


  • Subject: Re: "End of file error"
  • From: nellA hciR <email@hidden>
  • Date: Fri, 29 Dec 2000 11:22:34 -0900

-- this may help you

set fRef to open for access file ,
"pb0:desktop folder:test" with write permission
set buff to read fRef
write (return & "next line") to fRef starting at ((get eof fRef) + 1)
close access fRef

-- hcir

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"


References: 
 >"End of file error" (From: ScaryFish <email@hidden>)

  • Prev by Date: Re: "End of file error"
  • Next by Date: Nested list multi - set
  • Previous by thread: Re: "End of file error"
  • Next by thread: Re: "End of file error"
  • Index(es):
    • Date
    • Thread