Announcement

Collapse
No announcement yet.

Opening and feeding input into DOS program?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Opening and feeding input into DOS program?

    I'm using a 16-bit DOS application that consists entirely of text prompts. It doesn't support redirected input completely (i.e. I can't pipe answers to prompts using a text file) and I'd like to be able to automate my work.

    Is it possible using the Console Compiler to write a routine that starts a DOS program and then feeds text input into the program? This wouldn't be a simple SHELL procedure...

    I'm using version 4.04 of the Console Compiler.

    Many thanks,
    --Tom
    Tom Brodhead

  • #2
    SendKeys?
    http://www.devx.com/vb2themax/Tip/19094

    Comment


    • #3
      Tom --

      Have you checked out my company's DOSBox Tools product? A free version is available for download, and PowerBASIC sells licenses for the full version. Just click on one of the links below...

      -- Eric Pearson, Perfect Sync, Inc.
      "Not my circus, not my monkeys."

      Comment


      • #4
        It doesn't support redirected input completely (i.e. I can't pipe answers to prompts using a text file)
        If you can't pipe it or redirect it the MS-DOS program must not be using stdin for input. (Or you are doing it wrong. Code not shown).

        All you can do with another program wrapped around it is send keystrokes or 'something' to the stdin; so before you could automate it, you'll have to figure out what it IS using. (e.g, it might be getting its input by reading the screen at a known row and column. Heck, I did this, I have to believe others have, too!)

        At that point a TSR program might work to pass that input to the program. So how current are you on creating TSRs with PB/DOS?
        Last edited by Michael Mattias; 24 Jun 2009, 09:21 AM.
        Michael Mattias
        Tal Systems (retired)
        Port Washington WI USA
        [email protected]
        http://www.talsystems.com

        Comment


        • #5
          Shell

          It is very easy to start a DOS program from PBCC and get back full control in PBCC when the DOS program end.
          Is is also easy to shell from a DOS program to a PBCC one and give back full control to the DOS program when the PBCC end
          I use that technique all the time to switch from 16 to 32 bits modules seamlessly.
          You can also pass variables and strings from one to the other.
          Old QB45 Programmer

          Comment


          • #6
            It is very easy to start a DOS program from PBCC and get back full control in PBCC when the DOS program end.
            You mean as shown here .. Win 32: Monitor Process with ShellExecuteEx June 22, 2001 ???

            MCM
            Michael Mattias
            Tal Systems (retired)
            Port Washington WI USA
            [email protected]
            http://www.talsystems.com

            Comment

            Working...
            X