SOLVED: Getting Plain-Text onto the Clipboard
SOLVED: Getting Plain-Text onto the Clipboard
- Subject: SOLVED: Getting Plain-Text onto the Clipboard
- From: Christopher Stone <email@hidden>
- Date: Tue, 11 Aug 2009 16:20:48 -0500
Hey Folks,
About a month ago I was struggling with the problem of getting entirely styleless text onto the clipboard. I had tried using the little applet 'Plain Text' which was simply too slow, and I finally settled on using a QuicKeys function to do this.
Further research has unearthed a couple of shell commands: pbcopy & pbpaste
set salutationText to "Hey Guys," & return & return do shell script "echo " & salutationText & "| pbcopy" pbcopy does the job quite neatly with no necessary 3rd party interaction.
Chris
______________________________________________________________________
On Jul 06, 2009, at 07:26, Christopher Stone wrote: Well. I've tried this every-which-way and can't get it to behave properly with Applescript, so what I've done is to use QuicKeys' 'Remove Styles' function on the clipboard. This works, and it's acceptably fast even on my old G4 PowerBook. It is not the solution I wanted.
If I remember correctly all text on the Mac is now Unicode, and I wonder if that's not part of the problem. It used to be possible to force plain text using a raw class. Similar to this:
set s to the clipboard set s to «class ktxt» of (s as record) set the clipboard to s
Is there any way to do something similar on Leopard?
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden