Copy, Copy, Copy, Paste: PowerToy Needed.
secretGeek .:dot Nuts about dot Net:.
home .: about .: sign up .: sitemap .: secretGeek RSS

Copy, Copy, Copy, Paste: PowerToy Needed.

Append To Clipboard, PowerToy required

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:

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:

and hit Ctrl-C, to copy this text to the clipboard

Next we highlight the second part of the quote:

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:

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




name


website (optional)


enter the word:
 

comment (HTML not allowed)


All viewpoints welcome. But the right to delete any post for any reason is reserved. Don't make me do it. Comments may be republished, emailed to your loved ones or printed and used as toilet paper. Who reads this legal bit anyhow?

TimeSnapper is a life analysis system that stores and plays-back your computer use. It makes timesheet recording a breeze, helps you recover lost work and shows you how to sharpen your act.

TimeSnapper won last year's Developer Competition at Larkware.com, and is used by over 10,000 people.

Articles

Do they store the code for TFS in TFS? Do they store the code for TFS in TFS?
Sudden TimeSnapper Discount! Sudden TimeSnapper Discount!
How Can Microsoft Beat Google? How Can Microsoft Beat Google?
TimeSnapper 3.1: Attack of the the Red/Green Stripes TimeSnapper 3.1: Attack of the the Red/Green Stripes
21 tools used in our MicroISV 21 tools used in our MicroISV
Lost Treasures of the DOS World: tree! Lost Treasures of the DOS World: tree!
The Virtual Machine Machine and the Virtual Virtual Machine The Virtual Machine Machine and the Virtual Virtual Machine
Should Linq To Sql Go Should Linq To Sql Go "Open Source"?
Redux: New Synchronisation Idea Overlooked By Microsoft Redux: New Synchronisation Idea Overlooked By Microsoft
New Synchronisation Idea Overlooked By Microsoft Live team New Synchronisation Idea Overlooked By Microsoft Live team
Visual Studio UX Taskforce, Office UX Taskforce... etc. Visual Studio UX Taskforce, Office UX Taskforce... etc.
How to be Jeff Atwood How to be Jeff Atwood

Archives .: secretGeek :: Complete Archives :.
25 steps for building a Micro-ISV 25 steps for building a Micro-ISV
3 minute guides -- babysteps in new technologies: powershell, JSON, watir, F# 3 Minute Guide Series
Top 10 SecretGeek articles Top 10 SecretGeek articles

Downloads

TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 3.1: instant productivity profiles

ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Next Action NextAction
Managing the top of your mind



[powered by Google] 


Thai Erawan, Brisbane Restaurant, delicious thai food in paddington Thai Erawan, Brisbane Restaurant
World's Simplest Code Generator (html edition) World's Simplest Code Generator
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker
How to be depressed How to be depressed
You are not inadequate.



Recommended Reading

The Best Software Writing I
The Business Of Software (Eric Sink)

Recommended blogs

Jeff Atwood
Reginald Braithwaite
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Joel Pobar
Eric Sink
Joel Spolsky
Des Traynor

Aggregated Links

programming.reddit.com
dzone
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
n links today
new and notable
morning coffee
learning .net
weekly link post
(my del.icio.us account)

LinkedIn profile
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2003 .: privacy

home .: about .: sign up .: sitemap .: RSS .: © Leon Bambrick 2003 .: privacy