Copy, Copy, Copy, Paste: PowerToy Needed.
 I have a little request. What I'd like is a keystroke that appends the selected text to the current item in the clipboard. Rather than doing this: - Copy, switch document, paste, switch back again.
- Copy, switch document, paste, switch back again.
- Copy, switch document, paste, switch... etc...
You could just go: - Copy, copy, copy, switch document. Paste.
[continues....]
For example, imagine we have this text:
"it was the best of times," wrote Dickens, "and it was the worst of times."
And we want to extract just the bit dickens wrote: "it was the best of times, and it was the worst of times."
We highlight the first part of the quote:
"it was the best of times," wrote dickens, "and it was the worst of times."
and hit Ctrl-C, to copy this text to the clipboard
Next we highlight the second part of the quote:
"it was the best of times," wrote Dickens, "and it was the worst of times."
and hit Start-C, to append this to the item currently in the clipboard
Switch to another document and hit Ctrl-V. The result is:
"it was the best of times,and it was the worst of times."
Better yet, consider a case where the items we're copying are spread over multiple pages, or multiple documents.
This feature could be useful for coders, editors, data entry people, composers, refactorers, thinkers and plagiarists.
First person to implement it gets a tip of the hat in gratitude.
'Boxy' on Mon, 16 Jan 2006 00:01:04 GMT, sez: Ever heard of the office clipboard?http://support.microsoft.com/kb/q221190/
It's mostly annoying but does what you want across multiple applications. :) .. you have to press the "Paste All" button to paste the result into your doc/spreadsheet.
There is also the Clipboard ring in VS.NET (CTRL+Shift+V to loop through).. but it only collects when you are in VS.NET. And doesn't have a paste all option.
http://msdn.microsoft.com/library/en-us/vsintro7/html/vxoriWhatsNewInVisualStudioNET2002.asp?frame=true#vxoriwhatsnewinvisualstudioanchor5
Enjoy!
'Geoff Appleby' on Mon, 16 Jan 2006 00:26:46 GMT, sez: It was the best of times, it was the blorst of times!?
That's a pretty cool idea - me, I hate both the clipboard ring and the stupid office clipboard.
'sg' on Mon, 16 Jan 2006 00:40:55 GMT, sez: Stupid Monkeys!
"I hate both the clipboard ring and the stupid office clipboard"
yerp.
'Dan F' on Mon, 16 Jan 2006 00:45:19 GMT, sez: Cool idea! If only there was that magic -3am I'd give it a bang.
Although, I'm not sure if you could make it magically work out that you wanted the extra comma from the first bit of copied text :P
'sg' on Mon, 16 Jan 2006 02:55:06 GMT, sez: i use a program called "Clipboard Recorder"
(see http://www.lw-works.com/)
so i wrote to them asking for the feature
'Jason Nadal' on Mon, 16 Jan 2006 10:48:20 GMT, sez: Clipboard switcher is the software you need... it's a very old school program. Use Ctrl+[insert a # here] to switch between clipboards:
ctrl+1, hilight, ctrl+c
ctrl+2, hilight, ctrl+c
ctrl+3, hilight, ctrl+c
go to destination doc,
ctrl+1, ctrl+p, ctrl+2, ctrl+p, ctrl+3, ctrl+p
I posted the download link as my homepage in this comment. It's shareware, not freeware, but it's been invaluable to me!
'RobWilliams' on Mon, 16 Jan 2006 20:29:39 GMT, sez: Ok sure that would be nice, but what would be absolutely smashing would be a clipboard swap, one keystroke combination to swap the contents of the clipboard with the selection...
I only really want it in VS anyway so somebody please tell me its been there all along and I just haven't looked hard enough...go on...please
'leon' on Mon, 16 Jan 2006 20:40:55 GMT, sez: cheers rob --
all you need to do is create a macro that...
okay, my knowledge stops at that point. i've got visual studio hacks sitting on the desk next to me... but too much work to do.
it sounds like a macro possibility though.
string x = selected text
paste from clipboard
insert x into clipboard
'Jon Galloway' on Tue, 17 Jan 2006 05:15:36 GMT, sez: ClipX is pretty good for this kind of thing. Like the clipboard right for all of Windows. http://bluemars.org/clipx/
Copy, copy, copy, ctrl-shift-V, ctrl-shift-V, ctrl-shift-V
'RobWilliams' on Tue, 17 Jan 2006 17:31:22 GMT, sez: oh you goaded me into with that "all you need to do" bit so i dusted of my barely skimmed copy of vs hacks, applied appropriate lubricant to that dying region of my brain thats mostly forgotten vb now, in otherwords coffee, and voila (well not quite voila, there was a bit of ask google involved too) ClipTastic! Thank you for making me make my life better :)
Imports EnvDTE
Imports System.Diagnostics
Public Module ClipTastic
Dim clipboardText As String
Sub Swap()
Try
Dim selection As TextSelection = DTE.ActiveDocument.Selection
Dim selectedText As String = selection.Text
Dim clipBoardThread As System.Threading.Thread = New System.Threading.Thread(AddressOf CopyClipboard)
With clipBoardThread
.ApartmentState = System.Threading.ApartmentState.STA
.IsBackground = True
.Start()
.Join()
End With
clipBoardThread = Nothing
selection.Copy()
selection.Insert(clipboardText, vsInsertFlags.vsInsertFlagsCollapseToStart)
Catch
End Try
End Sub
Sub CopyClipboard()
Dim cdo As System.Windows.Forms.IDataObject = System.Windows.Forms.Clipboard.GetDataObject()
clipboardText = CType(cdo.GetData(System.Windows.Forms.DataFormats.Text), String)
End Sub
End Module
'leon' on Tue, 17 Jan 2006 22:49:45 GMT, sez: sweet work rob -- i htmlised it...
now what about the AppendToClipboard function?
'RobWilliams' on Thu, 19 Jan 2006 15:55:20 GMT, sez: Ok here's a sub that appends the selected text to the clipboard. Theres plenty of room for refactoring if its in the same module as Swap() and its a touch clumsy (a more elegant solution being appending the selected text to the clipboard, rather than prepending the clipboard text to the solution), but it works and was quick, which is good, as I am at work ;)
Sub Append()
Try
Dim selection As TextSelection = DTE.ActiveDocument.Selection
Dim selectedText As String = selection.Text
Dim clipBoardThread As System.Threading.Thread = New System.Threading.Thread(AddressOf CopyClipboard)
With clipBoardThread
.ApartmentState = System.Threading.ApartmentState.STA
.IsBackground = True
.Start()
.Join()
End With
clipBoardThread = Nothing
selection.Insert(clipboardText, vsInsertFlags.vsInsertFlagsInsertAtStart)
selection.Copy()
selection.Insert(selectedText, vsInsertFlags.vsInsertFlagsCollapseToStart)
Catch
End Try
End Sub
'Fosnez (sordfish)' on Fri, 12 May 2006 10:41:21 GMT, sez: mmmm cheese
'emily' on Fri, 11 Aug 2006 13:47:55 GMT, sez: how do i get free html's for my website
'BabyBoomer' on Wed, 06 Dec 2006 12:37:48 GMT, sez: There is an easier way of doing this:
Public Module RecordingModule
Public clipboard_text as String
Sub Gather()
Dim clipBoardThread As System.Threading.Thread = New System.Threading.Thread(AddressOf GetClipboard)
With clipBoardThread
.ApartmentState = System.Threading.ApartmentState.STA
.IsBackground = True
.Start()
.Join()
End With
clipBoardThread = Nothing
Dim selection As TextSelection = DTE.ActiveDocument.Selection
clipboard_text = clipboard_text + selection.Text
clipBoardThread = New System.Threading.Thread(AddressOf SetClipboard)
With clipBoardThread
.ApartmentState = System.Threading.ApartmentState.STA
.IsBackground = True
.Start()
.Join()
End With
clipBoardThread = Nothing
return
End Sub
Sub GetClipboard ()
clipboard_text = My.Computer.Clipboard.GetText ()
return
End Sub
Sub SetClipboard ()
My.Computer.Clipboard.SetText (clipboard_text)
return
End Sub
End Module
|