Can I pipe the output of a command to the current cursor? I have a small executable that generates random test data for me. I would like to be able to hit some hot key and have that output sent to the current cursor position - whatever has focus at the time (Emacs, a web page form, iTerm etc).

Any ideas how I might be able to do this?
If you don't mind two keys, you could do this trivially with sending the output of the script to the pasteboard:

script | pbpaste


Then Command-V as a second key shortcut to follow the first would work well. 

What you'd need to make this all one shot is an application that registers with the OS to actually take over the keyboard and input text. I use LaunchBar for that but AppleScript/Automator and the gold standard for scripting input - TextExpander - would be worth investigating if you want more advanced options. The steps to configure each of these depends on which app you select to control your Mac.

You can see the apps you have that are able to control (enter text at the insertion point in your case) by opening the Security &amp; Privacy preference pane and selecting Privacy and then selecting Accessibility.