Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Quickly strip formatting from Safari's clipboard' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Quickly strip formatting from Safari's clipboard
Authored by: johnsawyercjs on Feb 07, '09 05:03:13AM

That Applescript does properly strip formatting from the clipboard contents, but it doesn't successfully paste what it's stripped. Possibly the author wrote it without testing it, since it SEEMS like sending a simple Command-V from this Applescript should accomplish a paste. Instead, the Applescript launches, strips the clipboard formatting, then quits without pasting, but you can then enter Command-V to paste the stripped clipboard into the app of your choice. You might as well remove the line

tell application "System Events" to keystroke "v" using {command down}

I decided to use Plain Clip instead, since it's faceless--no launching app to get in the way. I tried to get Spark to launch Plain Clip, but Spark didn't work for me, in a variety of ways--not launching, hanging, etc., and when it didn't hang, it didn't respond to my keyboard command to launch Plain Clip (I tried Option-Command-V, trying to paste into TextEdit and Microsoft Word 2004, version 11.5.0). So, I tried Keyboard Maestro--that worked. However, my first attempt at creating a Keyboard Maestro macro to launch Plain Clip, I also appended a command to the macro to send a Command-V to paste the stripped clipboard, but like the Applescript suggested by SimonDorfman above, it wouldn't paste after stripping. So, I just removed the Command-V part of the macro, and settled on entering its trigger (Option-Command-V) to strip the clipboard, and then I enter the regular Command-V to paste the clipboard at the insertion point in the desired target app.

[ Reply to This | # ]