Subject: | |
From: | |
Reply To: | |
Date: | Thu, 21 Jul 2011 00:05:52 +0900 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On 2011-07-20 [+0900 JST], at 10:52 PM, Andrus wrote:
> Because for me, in NWP v 1.3, while it does indeed copy all the non-contiguous selections, they do NOT come on separate lines. In fact they are run-on with no separation at all. Not even a space. TextEdit returns such with a Return separating each.
In NWP 1.3 and 1.4, I was using the macro below to copy non-contiguous selections with Return as separator.
Kino
--
### Copy Selections ###
# Put selections in the active clipboard with a newline separating each selection.
# You can change $sep by modifying the very first command of this macro.
$sep = Cast to String "\n" # Make LF (\n) plain text and put it in $sep.
$doc = Document.active
if $doc == undefined # If no document is open,
exit # exit silently.
end
$str = $doc.selectedSubtexts # Put selected texts in $str (array).
# Now $str is ("text-1", "text-2",... "text-N").
$str = $str.join $sep # Join all values in $str with LF as joiner.
# Now $str has become "text-1<LF>text-2<LF>...<LF>text-N".
if $str == '' # If $str is empty,
exit # exit silently.
# This occurs when there is just a zero-width selection (caret).
end
# if you need $sep after the last selection, enable the command below by removing #.
# $str &= $sep
Write Clipboard $str
### end of macro ###
|
|
|