Getting input from another prog?
I've written a prog that gets the stdin and then writes it to the log file. But at the mo i have to use the shell and type the text to be written and this isn't what i want to do. I wanted to be able to use say notepad and just get the data as the user is typing the text.
I tried (without success) to use the cmd line ./stats.exe < notepad and all i got was a load of rubbish that made no sense, as it's probably the source of notepad.
Is there a way to get the input from notepad or is it possible to just get the data when the user presses the keys for any prog, therefore eliminating the whole trying to look at one program and just focus on the keyboard input?
Obviously I'm looking at doing this all in real time.
Many thanks in advance,