I hate that the Mac likes to put styled text on the clipboard and use it everywhere. Like when I am in Safari, I ctrl-click a link and select "Copy Link," and I get styled text of the link text that is hyperlinked. I do not want that. I want the link. So I have to paste it into Safari or BBEdit, then select it and copy it again, so I can paste it into iChat without being retarded.
And I don't care if you like it that way! I don't.
So I figured I'd use this simple AppleScript:
set the clipboard to (the clipboard as string) as string
#!/usr/bin/perl use Mac::Glue ':all'; my $glue = new Mac::Glue 'Finder'; $glue->set_the_clipboard_to($glue->the_clipboard(as => 'string'));
set the clipboard to «class ktxt» of ((the clipboard as string) as record)
$ pbpaste | pbcopy
Re:Easier
pudge on 2006-07-12T15:50:33
That's not easier for this purpose, which is to just run a script while I am in the GUI. That would execute more slowly than the AppleScript version, if I put it in Script Menu. It's less characters, though!
Re:Easier
Matts on 2006-07-12T15:57:54
Fair enough. I figure most people with OS X don't know about pbcopy/pbpaste - two of the most useful tools on a mac IMHO.