• 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
Tex-Edit add line endings appending cr
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tex-Edit add line endings appending cr


  • Subject: Tex-Edit add line endings appending cr
  • From: Robert Poland <email@hidden>
  • Date: Sat, 27 Sep 2003 15:48:25 -0600

hi,

I'm trying to create a script to modify a web page. I want to change:

<CENTER><FONT SIZE="+2">
Revised 9/23/2003
</FONT>

to:

<CENTER><FONT SIZE="+2">
Revised todays date
</FONT>

The following does everything except it moves the last line to after
the 2nd line ie.

<CENTER><FONT SIZE="+2">
Revised todays date </FONT>

Down the road this will cause problems.
I think I'm having syntax problems with the statement "add line
endings appending cr". It works, except it puts the cr in the wrong
location. How do I deal with that?
Will deal with the date format later.

tell application "Tex-Edit Plus"
activate
tell window 1
search looking for "Revised"
copy -- copy "Revised"
select (text from (the end of the line before
selection) to (the line after the selection))
delete selection -- delete line
paste -- paste "Revised" back in
insert date
add line endings appending cr
end tell
end tell
--
Bob Poland - Englewood, CO
http://www.ibrb.org/
_______________________________________________
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: Tex-Edit add line endings appending cr
      • From: Gnarlodious <email@hidden>
    • Re: Tex-Edit add line endings appending cr
      • From: Walter Ian Kaye <email@hidden>
  • Prev by Date: Re: Bug in (scripting) Excel.
  • Next by Date: Re: jmlbeud ceararhtcs
  • Previous by thread: Passing information from OS X to OS 9 via AppleScript?
  • Next by thread: Re: Tex-Edit add line endings appending cr
  • Index(es):
    • Date
    • Thread