Applescript to "paste" clipboard

Elias picture Elias · Sep 9, 2014 · Viewed 11.9k times · Source

I am working on an Applescript to paste what was last copied to any current field. It is to be used with VoiceOver and the key code way (only way I know how) does not work all of the time.

    tell application "System Events" to key code 9 using command down

    say "paste"

Answer

jweaks picture jweaks · Sep 9, 2014

I use keystroke:

tell application "System Events" to keystroke "v" using command down

I'm not aware of an error you should get, so you'll have to share.