On non-contiguous selection & macros

Have a problem? A question? This is the place for answers from other Express users.
Post Reply
ojamandar
Posts: 3
Joined: 2006-12-12 04:27:09
Location: Osaka, Japan

On non-contiguous selection & macros

Post by ojamandar »

How can I put non-contiguous selections in paretheses all at once? The macro I have with NWE 2.7 is:

#Nisus Macro Block
#source front selection
#destination front selection
#End Nisus Macro Block
binmode(STDIN, ":utf8");
binmode(STDOUT, ":utf8");

read STDIN,$text,10000;
$text = "($text)";
print $text;

All it does for me is adoin the first and the last selection and make them contiguous and put the newly formed string in paentheses. Similar things happen with Quote Selection Macros? Please someone out there, help me out of this situation.
*********
ojamandar
*********
dshan
Posts: 334
Joined: 2003-11-21 19:25:28
Location: Sydney, Australia

Post by dshan »

I don't think you can do this. Non-contiguous blocks of selected text are passed to Perl as a single block of concatenated text, this behavior prevents their use with Perl macros. I really wish Nisus would do something about this...
User avatar
martin
Official Nisus Person
Posts: 5228
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Post by martin »

dshan is correct, you won't be able to accomplish what you want at this time, sorry.
ojamandar
Posts: 3
Joined: 2006-12-12 04:27:09
Location: Osaka, Japan

Post by ojamandar »

Thank you very much.

p.s. I can change non-contiguously selected items into italics, for instance, by pressing Command+I, so I thought maybe I should be albe to ...
*********
ojamandar
*********
Post Reply