TextEdit: Paste from clipboard

How about pasting text from the clipboard in TextEdit?

Same kind of hack:

tell application "TextEdit"
	activate
	tell application "System Events"
		keystroke "v" using {command down}
	end tell
end tell
-- or
tell application "TextEdit"
	activate
	tell application "System Events"
		keystroke (the clipboard)
	end tell
end tell

I doubt that would work if the clipboard isn’t text.

There are more ramifications than that:
The second method doesn’t transmit any formatting - just text.
The first tranmits rtf if that is what was in the clipboard.
Interesting variation, no?

Thanks. Interesting results.

There’s an application called Koolclip which allows you to see all of the things you’ve copied to the clipboard for ages. Like a clipboard history. Anyone know how to browse back into your clipboard past with applescript?

This doesn’t really have anything to do with the current thread. The clipboard itself doesn’t keep a history.

sorry, I thought I was saving space