append to clipboard with hotkey

0

1

I am looking for a way to append selected text to the current clip in the clipboard with a hotkey in windows.

I need this to either be a clipboard manager or be a solution that will work together with a clipboard manager.

Is there any solution to this ?

kofifus

Posted 2015-02-23T02:39:39.303

Reputation: 179

Answers

0

Yes there is a solution, I'm using it.

Please use this AutoHotKey macro:

^!Insert::  ;work with clipboard: add delimiter and marked text to existing clipboard content
    ClipboardText = %Clipboard%  ;remove formatting
    SendEvent ^c  ;send the Ctrl+C command, must be sent as event so apps get it correctly
    ClipWait
    ClipNew = %Clipboard%
    Clipboard = %ClipboardText%||%ClipNew%
    ClipboardText =  ;clear the variable
    SplashTextOn 200,20,Clipboard Added,%ClipNew%
    Sleep 1000
    SplashTextOff
Return
  • Key mapping goes to Ctrl+Alt+Insert, but you can change it.
  • I'm inserting || between inserted parts because it is practical when processing the result. You can modify or remove it.
  • And do not forget to run AutoHotKey with administrator privileges! (Otherwise it cannot always perform its actions.)

miroxlav

Posted 2015-02-23T02:39:39.303

Reputation: 9 376

thanks miroxlav ! the problem with such a solution is that it doesn't seem to work together with a clipboard manager. The script keeps sending CTTRL+c which the clipboard manager catches and stores separately – kofifus – 2015-02-23T22:41:15.407

@kofifus – Isn't your clipboard manager using history? I am using clipboard manager 3D Clipboard which has history of 100 items. Each usage of the above macro adds 2 entries to clipboard history, but with given history length, it is not a problem. If your clipboard manager behaves worse than this, maybe you can consider switching to other tool. Please understand that getting the clipboard content other way than sending ^c is not possible for most applications. Therefore it is not possible to avoid extra items in ANY clipboard manager – unfillable requirement.

– miroxlav – 2015-02-24T07:10:34.040

Yes thx, but the clipboard manager itself could easily do it. Are you aware of any clip manager which has an append feature ? – kofifus – 2015-02-25T00:53:17.360

@kofifus – no, I'm not. Anyway, the above solution does what you requested in the question. I'm successfully using it. You have originally given no other criteria to fulfill. You can try the macro out and if your clipboard manager has problem, perhaps you can try 3D Clipboard which I'm using. – miroxlav – 2015-02-25T01:12:58.323