Tex-Edit add line endings appending cr
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.