simulating a keyboard input to xcode console when application is running

Hi,
I’m working on an OF application that calls external program, but it requires user to “press any key to proceed” in console after the program is finished. Is there a way to simulate a keyboard input to xcode console so that my application can run without halting/waiting for user to press any key in console?

some similar issue discussed here for windows:
http://forum.openframeworks.cc/t/hiding-command-window-and-minimizing-to-system-tray/1244/0

Thanks.