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. Aim for constructiveness. Comments may be republished, emailed to your loved ones or printed and used as toilet paper. Also, I get particularly nasty on comment spam. It's not worth even trying to post comment spam here -- your html is escaped, and your links are given a rel='nofollow'. By attempting to post a comment, you understand that if the comment is considered spam, at my absolute discretion, your IP address may be used as the target of a prolonged distributed denial of service attack. Your electricity might suddenly stop working. Your car tyres will go mysteriously flat. You will suffer permanent hairloss. Your dreams will be filled with terrifying monsters. And in any case I reserve the right to record and publish your IP address.

 

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.

 

NimbleText - FREE text manipulation and data extraction

NimbleText is a Powerful FREE Tool

Use it for:

  • extracting data from text
  • manipulating text
  • generating code

It makes you look awesome. Use it right now! Go on! Hurry! Don't walk, run!

 

Articles

Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion Mind-boggling Demo of New Gaming Genre, aka Folder-Based Hangman, aka Fun with Recursion
Got CSV in your javascript? Use agnes. Got CSV in your javascript? Use agnes.
I went to write down a book name and founded an internet empire instead. I went to write down a book name and founded an internet empire instead.
NimbleText: Origins NimbleText: Origins
The Windows 8 Mullet The Windows 8 Mullet
Cosby: spontaneous striped background generator Cosby: spontaneous striped background generator
Slides from WDCNZ: Live Coding Asp.net MVC3 Slides from WDCNZ: Live Coding Asp.net MVC3
MVC 3, MVC 3, "Third Times a Charm" references
Custom Errors in ASP.Net MVC: It couldn't be simpler, right? Custom Errors in ASP.Net MVC: It couldn't be simpler, right?
Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold Anatomy of a Domain Hijacking, part 2: The Website Who Came In From The Cold
Anatomy of a Domain Hijacking, part 1 Anatomy of a Domain Hijacking, part 1
secretGeek.net domain has been stolen. The site may go down. secretGeek.net domain has been stolen. The site may go down.
Boring article: 'untrusted domain' issue with SQL Server. Boring article: 'untrusted domain' issue with SQL Server.
Coding While You Commute Coding While You Commute
Test Driven Dentistry Is A Good Thing Test Driven Dentistry Is A Good Thing
The 'less crashy' release of NimbleText The 'less crashy' release of NimbleText
Rethinking Toolbars in Visual Studio (or any IDE) Rethinking Toolbars in Visual Studio (or any IDE)
Where shall we have lunch? Where shall we have lunch?
Setting up email for your microIsv Setting up email for your microIsv
The NO Visual Studio movement: Compiling .net projects in Notepad++ The NO Visual Studio movement: Compiling .net projects in Notepad++
ZeroOne: the editor for programmers who think in binary ZeroOne: the editor for programmers who think in binary
Mercurial workflow for personal projects (with a .net bias) Mercurial workflow for personal projects (with a .net bias)
I see you're using vim. Let me fix that for you. I see you're using vim. Let me fix that for you.
The worst recruitment spam I've ever read The worst recruitment spam I've ever read
A thank you I forgot to say A thank you I forgot to say
My new product, NimbleText, is live My new product, NimbleText, is live
Grabbing the free songs of Jonathan Coulton (with Powershell) Grabbing the free songs of Jonathan Coulton (with Powershell)
Using NimbleSet to compare lists Using NimbleSet to compare lists
Wanted: Wiki Lists (dot org) Wanted: Wiki Lists (dot org)
DOS on Dope: The last MVC web framework you'll ever need DOS on Dope: The last MVC web framework you'll ever need
JSON Query Languages: 5 special purpose editors JSON Query Languages: 5 special purpose editors
What then, is b? What then, is b?
SQLike: A simple editor SQLike: A simple editor
Yet Another BizPlan Generator. Yet Another BizPlan Generator.
HOT GUIDS: A hot or not site for guids HOT GUIDS: A hot or not site for guids
How does life get better? One tiny hack at a time. How does life get better? One tiny hack at a time.
24 things to do, and 100 things *not* to do (yet) for building a MicroISV 24 things to do, and 100 things *not* to do (yet) for building a MicroISV
Venture capital won't kill Jeff Atwood, it will only make him Jeffer. Venture capital won't kill Jeff Atwood, it will only make him Jeffer.
A handy workflow image for newbie mercurial users A handy workflow image for newbie mercurial users
Fractal Feedback, a diversion into recreational programming Fractal Feedback, a diversion into recreational programming
Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe. Hump-Jumping: How the Education of Computer Science can be Saved, err, maybe.
Suggested User Experience Improvements for DiffMerge Suggested User Experience Improvements for DiffMerge
SQL Style Extensions for C# SQL Style Extensions for C#
The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's The Movie Hollywood (And My Wife) Doesn't Want You To See: Weekend at Jacko's
Sysi: the ultimate administrators toolkit Sysi: the ultimate administrators toolkit

Archives .: secretGeek :: Complete Archives
TimeSnapper -- Automated Screenshot Journal TimeSnapper.com    
Version 3.3: true productivity boost

Next Action NextAction
Managing the top of your mind

NimbleText -- World's Simplest Code GeneratorNimbleText -- World's Simplest Code Generator, Text Manipulator, Data Extractor

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
Universal Troubleshooting checklist Universal Troubleshooting Checklist
Top 10 SecretGeek articles Top 10 SecretGeek articles
ShinyPower (help with Powershell) ShinyPower
Now at CodePlex

Realtime CSS Editor, in a browser RealTime Online CSS Editor
Gradient Maker -- a tool for making background images that blend from one colour to another. Forget photoshop, this is the bomb. Gradient Maker


[powered by Google] 


How to be depressed How to be depressed
You are not inadequate.



Recommended Reading


the little schemer


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

Recommended blogs

Jeff Atwood
Joseph Cooney
Phil Haack
Scott Hanselman
Julia Lerman
Rhys Parry
Joel Pobar
Thomas White
OJ Reeves
Eric Sink

Aggregated Links

proggit
dzone
hacker news
dot net kicks

Human Link Machines

interesting finds
a continuous learner's weblog
arjan's world
weekly link post

LinkedIn profile
LogEnvy - event logs made sexy
Computer, Unlocked. A rapid computer customization resource
PC Smart Buys - Computer Hardware in Australia
 
home .: about .: sign up .: sitemap .: secretGeek RSS .: © Leon Bambrick 2003 .: privacy

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