I want an AppleScript that launches Plain Clip and then pastes the clipboard into the current document where the cursor is. My script launches Plain Clip (a format-clearing app that doesn't steal focus), but it doesn't paste the new clipboard. Any ideas?

I have System Events type out the clipboard for me all the time, into text fields that don't allow pasting. For example, I have long, random-character passwords for some encrypted disk images stored in a password manager, but DiskImageMounter doesn't allow pasting.
–
Joel ReidAug 3 '12 at 14:36

This works within the AppleScript editor if I click Run. However, I've set a keyboard shortcut to run this, and when I press the shortcut, weird things happen. It doesn't paste the clipboard. Furthermore, I want it to remove leading/trailing spaces/tabs from each line, as well as blank lines and invisible control characters, like Plain Clip does. Is this possible? Thanks!
–
ZadeAug 4 '12 at 4:40