Move Comments to Marked Text (in one swell foop)—Solved
Posted: 2013-09-29 16:29:26
Hi,
I have a simple macro like this:
This works fine, but of course it works for only one Comment at a time.
Edit: I had asked how to make this work for all Comments at once.
By stealing from http://www.nisus.com/forum/viewtopic.php?f=17&t=3955 I got what I was after.
This is what I ended up with:
It does what I wanted, but perhaps it's stupid. If so, do let me know.
Thanks.
I have a simple macro like this:
Code: Select all
Go to Next Comment
Copy
Go to Marked Text
Paste
Edit: I had asked how to make this work for all Comments at once.
By stealing from http://www.nisus.com/forum/viewtopic.php?f=17&t=3955 I got what I was after.
This is what I ended up with:
Code: Select all
Select Document Start
$count = 0
While true
# move to the next comment, detecting if no more comments
$previousSelection = TextSelection.active
Menu 'Go to Next Comment'
$selection = TextSelection.active
If $selection.range == $previousSelection.range
Break
End
Menu 'Copy'
Menu 'Go to Marked Text’
Menu ‘Paste’
End
Thanks.