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


Click here to return to the 'Modify Cocoa apps to support paste as plain text' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Modify Cocoa apps to support paste as plain text
Authored by: Mikey-San on Oct 07, '04 07:16:57PM

Why hack your apps?

Hop into a text editor and pen this script:

#!/bin/sh
pbpaste | pbcopy

Add it to your Script Menu via the ~/Library/Scripts folder, and viola! This script converts the contents of the clipboard to plain text.



[ Reply to This | # ]
sh script?
Authored by: airdrummer on Oct 07, '04 08:58:32PM

did that, also chmod'd a+x, but all it does is open the script in the editor...

what am i missing here?



[ Reply to This | # ]
it's worse...
Authored by: airdrummer on Oct 07, '04 09:05:28PM

script menu alert:

Error: Couldn't execute the tool /Users/tomw/Library/Scripts/pasteAsPlainText.sh; errno is 2 (No such file or directory).

but here it is:

tomsPbook:~/Library/Scripts tomw$ ls -l
total 16
-rwxr-xr-x 1 tomw staff 26 7 Oct 20:54 pasteAsPlainText.sh

wtf???



[ Reply to This | # ]
Modify Cocoa apps to support paste as plain text
Authored by: fxt on Oct 08, '04 01:44:57AM

you have to wrap this in applescript for this to work in your ~/Library/Scripts. do shell script "pbpaste | pbcopy"

fxt



[ Reply to This | # ]
Modify Cocoa apps to support paste as plain text
Authored by: echo on Oct 08, '04 02:00:39AM

This does work. It does what the author says, it converts the contents of the clipboard to plain text. Then you have to follow with a second step to paste.

I copied the script, named it with a .sh extension, and did a chmod +x and placed it in ~Library/Scripts/

I'm still watching here for a non hacking solution that will paste in the same step.



[ Reply to This | # ]
Modify Cocoa apps to support paste as plain text
Authored by: pozytron on Oct 08, '04 02:39:06AM
The SIMBL plugin I created is not a hack. It doesn't actually modify any of your applications. Removing the plugin will restore your programs.

Don't mean to toot my own horn, sorry, I just wanted to clarify :)

Cheers,
Robin

[ Reply to This | # ]

Modify Cocoa apps to support paste as plain text
Authored by: afb on Oct 08, '04 05:51:02PM

then give it a shortcut like command+control+v with menu master!

---
now is the time for all good cows to come to the aid of their pasture.



[ Reply to This | # ]