Subject: | |
From: | |
Reply To: | |
Date: | Thu, 14 Jul 2016 08:06:54 +0900 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hello,
I am trying to write a macro, and have a question. I have a document from which I want to extract all the line contents in an array of styled text. Here is what I did:
$doc_notes = Document.active
$found_num = Find '^\d+.+$', 'Ea'
$note_texts = Array.new
$selections = Array.new
if $found_num
$selections = $doc_notes.textSelections
foreach $index in reversed $selections
$note_texts.appendValue $index.text
end
prompt $note_texts.firstValue
end
The "prompt" command seems to show *all* the contents of the array, and not only the last one (it should be the last item of the array, since I did "in reversed $selections").
What should I do in order to have access to each value of the array?
Thank you very much in advance.
Best regard,
Nobumi Iyanaga
Tokyo,
Japan
P.S. This question is related to the next posting where I will explain the macro I would like to have.
|
|
|