Having a program send input to another program
Members - Reputation: 464
Posted 01 May 2011 - 10:37 AM
Members - Reputation: 259
Posted 01 May 2011 - 04:33 PM
You can also use a normal file for stdin, but this is more limiting.
EDIT: You can use a file for stdin, stdout, and stderr. stdin = fopen("myinput.txt", "rt"); is how that'd work.
I'm not sure if it would work the same on Windows, but it's worth investigation.
Crossbones+ - Reputation: 6305
Posted 01 May 2011 - 05:59 PM
If you're using X11 you can use the
Thank you. What about for an os other than windows? Whats the linux equivalent of that?
XSendEvent function to send events to any window.
XDefaultRootWindow gets you the root window for your display
XQueryTree lets you obtain the child windows of a given window (start from the root and work your way down the tree to get a complete list of windows)
The voices in my head may not be real, but they have some good ideas!