Re: Tex-Edit string manipulation.
Re: Tex-Edit string manipulation.
- Subject: Re: Tex-Edit string manipulation.
- From: Rachel <email@hidden>
- Date: Fri, 24 Aug 2001 11:11:32 -0600
Marc:
this looks like it should work, but I keep getting an error: CANT GET
CHARACTER 1 OF "".
I will play with it at my leisure, but I thought every line had at least a
CR. Ideas?
Rachel
Entity Marc K. Myers spoke thus:
>
I'd do it this way (it assumes that the text should start in column 26):
>
>
set someSpaces to " "
>
tell window 1 of application "Tex-Edit Plus"
>
repeat with i from 1 to (count paragraphs)
>
set theText to paragraph i
>
set x to word 1 of theText
>
set y to text from word 2 to word -1 of theText
>
set theDiff to 25 - (length of x)
>
set theText to x & (text 1 thru theDiff of someSpaces) & y
>
set paragraph i to theText
>
end repeat
>
end tell