×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Scripting a Command Prompt Application

Scripting a Command Prompt Application

Scripting a Command Prompt Application

(OP)
I have a dos application that requires user interaction through an application specific command prompt after execution.  I would like to "script" this application and the subsequent command line commands for the application.
  I have heard perl or a batch file may help and I have read alot about them in the last few days.  I know how to execute operating system commands in perl and batch.  This will get the application started in a shell.  But how do I issue the commands that go in the command for the application?

RE: Scripting a Command Prompt Application

Build a text file with the answers to the applications prompts, one answer per line.  Then when you start the application, redirect the input stream to the file like this:

 c:\> aplication.exe <answers.txt

Richard Ay
COADE, Inc.

RE: Scripting a Command Prompt Application

(OP)
Thanks!!!

That worked like a charm.

And just think, the developer of the application was going to charge us $2,000 to make the application "scriptable".

I didn't even realize the win 2k redirection was so similar to UNIX.  

RE: Scripting a Command Prompt Application

Most of that functionality has been there since before Windows.

TTFN

RE: Scripting a Command Prompt Application

As the old saying goes, "DOS is Boss".

;)

Richard Ay
COADE, Inc.

RE: Scripting a Command Prompt Application

I was thinking CPM, actually; having never owned or used a UNIX machine

TTFN

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources