Subject: | |
From: | |
Reply To: | |
Date: | Wed, 20 Jul 2011 09:23:48 -0600 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Thanks Kino San,
Thanks for the confirmation and the work-around for older versions.
But with the problem resolved in v 2, an upgrade will surely be a
better route! :-)
Ben
__________________________________________________
On 2011 Jul 20, Wed, at 9:05 am, Kino wrote:
> 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 ###
|
|
|