Run the following code to put some text on your clipboard:
set testString to "This string should be plain text."
set the clipboard to testString
If you open up a new .rtf file in TextEdit.app, and paste the clipboard into this document, you will observe that the clipboard contains rich text. Specifically, the clipboard text is of the font Helvetica
and size 12
.
I also tried specifying set the clipboard to (testString as string)
or set the clipboard to (testString as text)
. But, the code always puts rich text on the clipboard. This rich text is always of the same style (as described in the previous paragraph).
Is it possible to put text on the clipboard, as plain text, in AppleScript?
OS X El Capitan, version 10.11.6.