Subject:
|
Re: NQC stdin & stdout
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Sun, 13 Aug 2000 20:08:17 GMT
|
Viewed:
|
1709 times
|
| |
| |
In article <3990D5A1.9635859E@akasa.bc.ca>, Dean Husby
<nntp@akasa.bc.ca> wrote:
> I'm looking for some way in windows to send files to and from stdin &
> stdout.
>
> I'm not 'C' savvy. I'm building a macro set for a editor to NQC for the
> disabled and would like to talk to NQC via the above.
>
> If I can't talk to it directly I'd love a cmd line program that, when
> run, takes the contents of the Clip board and sends that to NQC via
> stdin. I can handle the output by way of a file if need be.
I'm not sure about the specific calls, but when you invoke one program
from another you typically can control what file handles are used as
stdin, stdout, and stderr by the launched program. Usually these are
just handed off from stdin/stdout/stderr of the calling program, but you
should be able to make them anything you want.
Sending data from the clipboard (or any other memory) may be tricky.
I'm not very familiar with Windows, but under Unix I'd probably have the
calling program create a pipe and hand the other end of the pipe to the
callee as stdin. Then the caller could just stuff all the data into the
pipe and close it, and the callee would see the data on stdin and then
also see an EOF.
From a more practical standpoint (given that I'm unfamiliar with the
Windows capabilities for exec'ing tasks, pipes, etc), if I had to do
this I'd probably take the lazy way out and have the calling program
just create a temp file, and pass that on the command line to NQC.
Inelegant, but very easy to implement.
Dave Baum
--
reply to: dbaum at enteract dot com
|
|
Message has 1 Reply: | | Re: NQC stdin & stdout
|
| (...) Yes, that would be the easiest way but also the most annoying as it forces me to change the file name on the users editor. I'm looking in to a DDE command way to avoid this, but so far without success. Thanks for your help btw. Dean -- (...) (24 years ago, 15-Aug-00, to lugnet.robotics.rcx.nqc)
|
Message is in Reply To:
| | NQC stdin & stdout
|
| I'm looking for some way in windows to send files to and from stdin & stdout. I'm not 'C' savvy. I'm building a macro set for a editor to NQC for the disabled and would like to talk to NQC via the above. If I can't talk to it directly I'd love a cmd (...) (24 years ago, 9-Aug-00, to lugnet.robotics.rcx.nqc)
|
7 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|