• 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
Insert Text Here
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Insert Text Here


  • Subject: Insert Text Here
  • From: Marconi <email@hidden>
  • Date: Sat, 21 Jan 2012 10:04:28 -0700

I need to open a text file for writing but, instead of appending text, I need to insert text at a given point.

Suppose I have a text file that is like this:

File starts here
some more stuff
insert text here.
some more stuff too
end of the stuff


And suppose I wanted to insert some text ("this has been inserted") after the designator "insert text here" such that the result is:


File starts here
some more stuff
insert text here.
this has been inserted
some more stuff too
end of the stuff

Is there a way, when writing a text file, to insert text rather than appending or overwriting?




--

"A man who believes in nothing will fall for anything." -- Malcolm X
_______________________________________________
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: Insert Text Here
      • From: Jon Pugh <email@hidden>
    • Re: Insert Text Here
      • From: Deivy Marck Petrescu <email@hidden>
  • Prev by Date: Re: Open Bugs
  • Next by Date: Re: Insert Text Here
  • Previous by thread: Re: Slow Applescript Mailing list
  • Next by thread: Re: Insert Text Here
  • Index(es):
    • Date
    • Thread