I use this to drop text "formatting" (i.e. markup, RTF, etc) when I'm copying and pasting under Windows.
Say you've got two email messages open, one you've received and one you're composing in reply. You want to copy a sentence into your reply, but when you paste you get the unwanted font, color, size etc of the original email.
For convenience I've bound this script to a hot-key <Win>-X so I can <CTRL>-C, <Win>-X, <CTRL>-V.
I used to do this by opening a plain-text editor (gvim), pasting, then copying again.
# Ridiculously simple, but very useful. use Win32::Clipboard; my $text = Win32::Clipboard::GetText() or exit; Win32::Clipboard($text) if $text;
|Replies are listed 'Best First'.|
Re: Drop formatting to paste plain text from Clipboard
by chanio (Priest) on Mar 27, 2007 at 18:01 UTC