23.8.13

Advanced Clipboard Manager , Copy-Paste more than one item

Have you ever needed to copy-paste more than one string or text at the same time?
Well, my friend needed it, desperately. She is a biologist and she writes her thesis with those scary endless words and phrases. She complained about having to keep all those phrases in a separate open file and switch windows each time she wants to paste something, mark it, copy with ctrl+c , switch window again and paste.

I came up with the following solution: An advanced clipboard, one which floats on the screen and can be populated with up to 9 strings. Pasting the strings is done by pressing ctrl and the number of the string.

Here is a video of how it works:

video


Manual:

when marking text and pressing ctrl+c, both windows-clipboard and the advanced clipboard(AC) are populated with the new word. The AC will suggest to add it to the list. Pressing the green button would turn it into red with a number.
Pressing this number and ctl would paste the appropriate cell content.
Pressing the red button would remove the text from the list and reorder the cell numbers.
You can still copy-paste with ctl+c and ctl+v as usual without noticing the AC.

Details:

I chose Python/Tk for GUI and logic, AutoIt for hooking the keystrokes, accessing windows-clipboard and pasting.
Main process spans the monitoring process and handles the GUI. It communicates with the monitoring process through a file.
This is a quick & dirty implementation but it works fine. A better version would be implemented only with AutoIt.

DOWNLOAD:

- Download Link -
Extract and double-click the file Advanced_Clipboard.py
Source files included as well as the binaries.
I don't write the whole source here because there are 4 files and plenty of code.

Requirements:

Python 2.X
Binaries work only on 64bit windows. If you wish to run it on 32bit then you should compile both AutoIt scripts (here is how to do it)

8 comments:

  1. Nice idea! Is it possible to left align text in the tkinter window? When I select a pieces of text of p.e. 10 words with spaces between them, the text is placed in the GUI after 20 or 30 spaces.

    ReplyDelete
    Replies
    1. I am certain it's possible. I would need to look into it though and I don't have the time at the moment. If you solve this and think it's a feature, let me know and I'll add it to the code base. Success!

      Delete
  2. I don't know tkinker. Will try to find a tutorial. Tnx again.

    ReplyDelete
  3. Found it: widget.config(font=labelfont) --> widget.config(font=labelfont, anchor="w")
    But now the text is under the red/green button.
    Just one question Robbie, do you know how to move the text to the right?

    ReplyDelete
  4. Well no matter. The idea is fantastic but the script has too many problems.

    ReplyDelete
    Replies
    1. Dear anonymous reader,
      I am glad you like the idea.
      You are welcome to download and use the script for any use.
      However, my solution is not meant to be a deliverable solution but a working prototype.
      I am sure there can be further improvements but I am dedicating my time in other projects at the moment.
      Feel free to share any improvement and I'll update the code for the convenience of the users.

      Delete