Page 1 of 1

Select range of lines and copy to clipboard

Posted: 25 Aug 2011 04:27
by jgodfrey
I've written a script that can detect a range of lines I'm interested in. Now, I'd like to:

1. Select the range of lines
2. Copy them to the clipboard

The only way I've found to select a range of lines is by using the Document.Cursor*(True) methods. While that works, it seems like it should be possible without physically navigating around the document. I tried using SelectLine() in a loop, but it only selects 1 line at a time. A SelectLineRange(Begin, End) method would be nice. Are the Cursor methods the only way to do this right now? On a large range, selection via Cursor* is quite slow...

For item #2 above, I haven't found a way to copy the selection to the clipboard via script. Currently, after my script runs, I need to press Ctrl+C. Is it possible to copy the selection to the clipboard?

Thanks,

Jeff