nisus.com
https://www.nisus.com/forum/

running through the items of a non-contiguous selection
https://www.nisus.com/forum/viewtopic.php?f=17&t=3946
Page 1 of 1

Author:  js [ 2010-10-06 22:33:39 ]
Post subject:  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?

Author:  Kino [ 2010-10-07 02:01:32 ]
Post subject:  Re: running through the items of a non-contiguous selection

You can use something like this.
Code:
$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

Author:  js [ 2010-10-07 05:48:01 ]
Post subject:  Re: running through the items of a non-contiguous selection

Fabulous. Just what I was looking for!

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/