Jump to content

Stdin/out


 Share

Recommended Posts

I amo no developer, and if you told me there was something wrong with the info in the link I am about post, I probably wouldn't know what you meant, but here it is:

http://dslweb.nwnexus.com/~ast/dload/guicon.htm

This looks like info on stdin/out from a win32 application. I hope this helps in getting a workable stdin-out into an autoit format.

Who else would I be?
Link to comment
Share on other sites

The problem is... it's a console that talks to the application, not to Windows. I've known how to do that for a long time (My testing project I use to test small snippets of C++ code is a Windows application that uses almost identical code to create a console window so std::cout works as expected). It's very easy to write to a console and even get input from a console, but it is not a console like @ComSpec. You can't type "dir" and get a list of the current files or anything like that. Really and truly, this form of console is no better than if the end-user were to create a simple GUI with an input control for typing data into and an edit control for displaying the data.

Link to comment
Share on other sites

  • Administrators

The problem is... it's a console that talks to the application, not to Windows.  I've known how to do that for a long time (My testing project I use to test small snippets of C++ code is a Windows application that uses almost identical code to create a console window so std::cout works as expected).  It's very easy to write to a console and even get input from a console, but it is not a console like @ComSpec.  You can't type "dir" and get a list of the current files or anything like that.  Really and truly, this form of console is no better than if the end-user were to create a simple GUI with an input control for typing data into and an edit control for displaying the data.

One of the things that was on the todo list was trapping output from dos programs. (You see it alot in editors that run scripts and capture the output). Do you know how to do that? So you could Run a ping or similar command and have the output redirected into a variable (rather than piping to a file and then reading the file in)
Link to comment
Share on other sites

One of the things that was on the todo list was trapping output from dos programs.  (You see it alot in editors that run scripts and capture the output).  Do you know how to do that?  So you could Run a ping or similar command and have the output redirected into a variable (rather than piping to a file and then reading the file in)

<{POST_SNAPBACK}>

No, I don't know how to, but I know where to find an example; SciTE. I looked at it's code to do this once. It looks like it replaces the stdin/stdout/stderr handles of the process that was launched with handles to pipes which obviously lead back into SciTE. That could be slightly incorrect as it's been a long time since I looked at SciTE's code.

Edit: this-is-me, all those links basically do the same thing it looks like. What needs done isn't console-related at all, instead, what needs done is to replace the stdin/stdout/stderr handles of an application with handles that feed the information back to AutoIt. It really has nothing to do with a console at all (Although console applications are usually the only ones that output to stdout/stderr...)

Edit 2: Jon, see this link where I mention what file and function specifically does this in SciTE.

Edited by Valik
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...