in reply to Re^3: automatically giving user input to a command line
in thread automatically giving user input to a command line

Got a dumb question. If this happens to be on Windows, would it be possible to use system to call the program within the DOS start command (which would open a new DOS command prompt window to run the program and immediately return control back to the Perl script) and then try to use Win32::GuiTest to "interact" with that new command prompt window?

I'm not saying this would be simple or easy or even elegant. Just trying to think of alternate methods of trying to interact with whatever program the OP is trying automate.

If this happens to be a bad idea, I'd like to hear the reason(s) why so that I (and perhaps others) can learn something new.

  • Comment on Re^4: automatically giving user input to a command line

Replies are listed 'Best First'.
Re^5: automatically giving user input to a command line
by BrowserUk (Patriarch) on Jun 14, 2012 at 14:21 UTC
    then try to use Win32::GuiTest to "interact" with that new command prompt window?

    Yes, Win32::GuiTest would be one way to tackle the problem.

    Another, potentially easier and yet more powerful way would be Win32::Console. It can do everything that Expect can do and more eg. mouse control.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      It is indeed inside a windows setting. I am looking into Win32::Console now, as in order to install Expect on my local system at least, I need to get cygwin. And since it is going to be awhile, I might as well start with this.
Re^5: automatically giving user input to a command line
by Anonymous Monk on Jun 14, 2012 at 12:03 UTC