Re: Applescript & Tex-Edit Plus
Re: Applescript & Tex-Edit Plus
- Subject: Re: Applescript & Tex-Edit Plus
- From: Rachel <email@hidden>
- Date: Fri, 24 Aug 2001 10:50:07 -0600
Guy:
Almost. I want the alphabetical characters to start at the same column
position so a later program can select only the text by character #.
I would need to insert a variable length space$ conditional on the length
of digit$. if it as any consolation, I have been working on this hours a day
and learning a lot.
Thanks
Rachel, Santa Fe
Entity List Guy spoke thus:
>
Document:
>
1 aaaa
>
23 bbb
>
300 cccccc
>
>
script:
>
>
set column_width to " " -- 12 spaces
>
tell application "Tex-Edit Plus" to set paragraph_count to count of
>
paragraphs in document 1
>
repeat with loop_counter from 1 to paragraph_count
>
tell application "Tex-Edit Plus" to set original_num to word 1 of
>
paragraph loop_counter of document 1
>
set number_length to length of (original_num as text)
>
set alignment_spaces to text 1 thru ((length of column_width) -
>
number_length) of column_width
>
tell application "Tex-Edit Plus" to copy alignment_spaces to after word
>
1 of paragraph loop_counter of document 1
>
end repeat
>
>
result:
>
>
1 aaaaa
>
27 bbbbb
>
300 ccccc
>
>
Is this what you intend?
>
>
grh