• 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
new line when writing to text file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new line when writing to text file


  • Subject: new line when writing to text file
  • From: Jack Schwart <email@hidden>
  • Date: Tue, 23 Mar 2010 23:28:53 -0400

Hi guys, anybody know what I'm doing wrong here...

I am trying to input data into a text file, with each successive entry on a new line.

I tried both...

" \r " and 

" &return" to no avail.  Either it wouldn't compile or I got an error code for incompatible data type.

Here's what I have so far...



set PerDiemFile to (path to desktop folder as string) & "PerDiem.txt" 

set WorkingFile to open for access file PerDiemFile with write permission

set eof of WorkingFile to 0 -- Overwrites existing file to start from scratch

write pilotName & "'s Pilot Per Diem Logbook " & taxYear & return & return to WorkingFile starting at (get eof WorkingFile)

write city to WorkingFile as string   -- what should go here to get it to skip to the next line?

write perdiemItem to WorkingFile as string  

write amountForItem to WorkingFile as string  -- same question here....how do I get it to skip a line after this input? 


It writes the first line of data correctly, skips two lines, but that's the best I can do. After that, all data 
is put in a straight line.

Thanks for any help,

Jack
 _______________________________________________
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

  • Follow-Ups:
    • Re: new line when writing to text file
      • From: Bruce Robertson <email@hidden>
    • Re: new line when writing to text file
      • From: Tim Mansour <email@hidden>
  • Prev by Date: Re: AppleScript access to databases
  • Next by Date: Re: new line when writing to text file
  • Previous by thread: Re: How to disable the -- comment
  • Next by thread: Re: new line when writing to text file
  • Index(es):
    • Date
    • Thread