I have a simple script that generates different output every time it's run (e.g. generate a UUID).

Is there a way to write an automator script that simply inserts the output of a script at the current cursor location?

(I want to run this service from Thunderbird, if that makes a difference.)

  • It's customary to explain why you're downvoting a post – Edward Falk Dec 12 '16 at 23:07

Could your automator script copy the output to clipboard and then run this script to paste the clipboard contents?

do shell script "pbpaste > /path/to/your/clipboard-file.txt"

This topic covers the paste function in more detail https://stackoverflow.com/questions/9976338/applescript-to-paste-text-from-clipboard-into-a-file

| improve this answer | |
  • This would insert the clipboard into the file, but would do so by replacing the entire file with the clipboard contents. – grg Dec 12 '16 at 9:09
  • I'm already having my automator script write its output to the clipboard. I then paste the result into my document. I was hoping to just have the automator output go directly to the document without having to be pasted. – Edward Falk Dec 12 '16 at 23:08
  • Sorry! I seem to have misunderstood! – Vinny Dec 14 '16 at 3:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .