running through the items of a non-contiguous selection
running through the items of a non-contiguous selection
Certain Services can be applied only to a contigous selection. Is it possible for a Nisus macro to run through the items of a non-contiguous selection (just like running through list items f.e.) to apply a service consecutively?
Re: running through the items of a non-contiguous selection
You can use something like this.
Code: Select all
$doc = Document.active
$sels = $doc.textSelections
foreach $sel in reversed $sels
$doc.setSelection $sel
Document.setActive $doc
Menu ':Nisus Writer Pro:Services:New TextEdit Window Containing Selection'
end
Re: running through the items of a non-contiguous selection
Fabulous. Just what I was looking for!