One of the first things I install whenever I find myself in front of a new Windows PC is PureText. It basically gives you a shortcut keyboard combination for “Paste Special -> Unformatted Text” which is something I find myself doing quite a lot. I hate pasting from one application into another and having all the formatting come with the text, and PureText solves that problem really easily. I now use it just about every time I paste. I think of paste as Windows-V now, instead of Ctrl-V. I felt a bit lost when I got Windows 8 at work and PureText didn’t work at first (it’s been updated now!)
PureText works by modifying the contents of the clipboard before pasting. This got me thinking about how else you could manipulate the clipboard when pasting. I thought it might be useful to have a utility which allowed you to set up a list of items. Each time you paste, the next item from the list would be placed into the clipboard ready for the next paste. Instead of lists, you could also set up expressions which the tool uses to create the next item, with some useful variables available, such as the index (the number of pastes you’ve done so far).
Purpose and Use Cases
The main purpose of the Smart Paste tool would be to improve the speed and accuracy of data entry (and similar) work, by automating common tasks that involve repeated pasting. It would be unashamedly a power user’s utility, for those people whose jobs involve lots of complex pasting and data entry operations and who are prepared to learn how to use a tool to save them a few vital seconds each time.
A possible use case for pasting from lists is that you have a list of names of conference attendees in one document, and you’re pasting them into another document which contains the name tags you’re going to print out. So you have to go to the first document, copy a name, go to the second document, paste it in and then repeat. Now you could probably set up some kind of mail merge in this specific case, but it’s not always going to be worth the trouble to do that. Instead, you could set up the list of names in the Smart Paste Tool, then just paste into each location on the name tag sheet, thus pasting a different name each time. This would be much quicker and more convenient.
A use case for expressions is one I’ve encountered when debugging code. For some tricky problems, stepping through in a debugger doesn’t work, and I want to output debug information at different points in the code. I sometimes do this with statements like Debug.WriteLine(“1”); for the first one, Debug.WriteLine(“2”); for the second one and so on. Then when I run the code I can see which was the last statement that ran before the application crashed. To do this I have to keep pasting the text then changing the number, which is tedious and error prone. Instead I could set up an expression that used the index to generate the next item of text for pasting, and just keep pasting in throughout my code.
This is how I think it would work. The application would allow you to set up what kind of paste rule you want to use: Expression or List. A list is just a text field for you to enter the items.
You would enter expressions using a simple language that enabled you to construct the text that will be pasted each time, using several variables and functions for useful values, such as the index.
It would also give you controls to move backwards and forwards through the items, and to restart from the beginning of the list (or the expression with index = 1). Keyboard shortcuts for various commands, including the all-important Paste command, would be configured on a form something like this:
Once your list or expression is set up, you just click “Done” and you can use the shortcut keys to paste from the sequence into whatever application you’re using.
When running, Smart Paste would sit in the system tray. Right-clicking would bring up a menu with some useful options.
When you hover over the Smart Paste icon in the system tray, a tooltip would pop up with information about the current clipboard item. It might also be useful for this to pop up every time you paste, to help you keep track of where you are in the sequence.
It’s Too Simple, Make it More Complicated!
A few more advanced possibilities spring to mind:
- You might want to be able to save and restore several sets of paste rules, and store them as presets with their own shortcut keys.
- You might want the ability to synchronise sequences across several people e.g. if you use the tool to paste serial numbers and these need to be unique across your team, you might want to use some central list, or even call a web service to get the next value each time.
- You might want to combine lists and expressions e.g. to paste from a list, but swap first and last names around.
- If this were a Windows only tool, I would probably build it in .NET because it’s the default choice for building Windows applications and I know my way around the framework.
- There isn’t really a single obvious choice for building cross platform desktop applications, so if it needed to run on OS X and Linux too then more research would need to happen. The way the clipboard is manipulated on OS X and Linux is probably different to how it works on Windows too. And setting up shortcut keys would be different too.
- I can’t believe anyone is doing intensive data entry on a tablet or smartphone, so I don’t think Android or iOS would ever need to be supported.
- You would need some kind of language for specifying the paste expressions. I would probably investigate embedding something like Lua for this. Although there might be better choices for languages to embed within .NET projects. In either case, this would give users a lot of power and flexibility when specifying paste expressions.