Pasting Plain Text Output

Hello All,

Was wondering if anyone could help me with this problem

Using:


set greeting to "Test"
set the clipboard to greeting
activate application "TextEdit"
tell application "System Events"
	keystroke "v" using command down
end tell

Issue:

  1. The applescript prints out a formatted text (Geneva 12) rather than the plain text.

Request:
2. How do we print out the content of the clipboard in plain text.

History:

  1. Previous OS X (10.4, 10.3) did not output a formatted text.
  2. Tried this with word 08, target is eudora.

It works fine for me on Leopard, but you might consider these alternatives:

set greeting to "Test"
set the clipboard to greeting
activate application "TextEdit"
tell application "System Events"
	keystroke "v" using {command down, option down, shift down}
end tell
set greeting to "Test"
set the clipboard to greeting
do shell script "/usr/bin/pbpaste | /usr/bin/pbcopy"
activate application "TextEdit"
tell application "System Events"
	keystroke "v" using {command down, option down, shift down}
end tell

My favourite routine for converting the clipboard to plain text is:


	set the clipboard to Unicode text of (the clipboard as record) --clipboard as Unicode text

I was thinking of that, but when I was quickly testing I couldn’t get styled text onto the clipboard to try it. :stuck_out_tongue:

Thanks for the help like always this board is truly amazing with all the helpful members for us novices.

set greeting to "Test"
set the clipboard to greeting
activate application "Eudora"

tell application "System Events"
	keystroke "v" using {command down, shift down}
end tell

Had to remove the option down in the system events as it added the following characters "| " to the output.

thanks