Re: Getting Perl to fill in requested data for a dos program

2001-12-11 Thread Nathan Thern

I used to use a product called Macro Scheduler
(http://www.mjtnet.com/). It uses a scripting language
that's no more complex than DOS's batch language.
Despite the name, what it really does is send
simulated key strokes and mouse commands to the
Windows OS (by that, I mean it does EXACTLY what you 
are looking for, as long as the DOS window is the 
selected window). If you don't register, there's a
15 second delay before a script begins (!@#$
shareware). I even wrote a perl script once to 
spit out Macro Scheduler scripts; don't ask me for it,
I can't find it.

I've been looking for something similar in Win32
based perl for years now. I don't think it's out
there.

This can be really powerful stuff. I once wrote a
script that sent a changing sequence of keystrokes
thousands of times to a CAD program and generated a
complex multi-layered electronic circuit. It would
have taken days by hand. Even so, I could have
written the script 10 times faster in perl than it
took me to do it in Macro Scheduler's hamstrung
language. Any of you gurus out there have an idea
how to implement something like this?

NT

--- [EMAIL PROTECTED] wrote:
 
 
 Hi,
 
 I'm trying to get perl to give input to a dos program.  Here's a description of
 what I want it to do:
 
 1. I want to have perl kick off a dos program that doesn't accept command line
 parameters.
 2. The Dos program, that perl will have started, will then prompt the user for
 input like Enter Name:
 3.  I want Perl to fill in what the program is asking for on the screen, and
 then send a carriage return.
 
 Any ideas?
 
 Thanks in advance,
 Jeff
 
 
 ___
 Perl-Win32-Users mailing list
 [EMAIL PROTECTED]
 http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users


__
Do You Yahoo!?
Check out Yahoo! Shopping and Yahoo! Auctions for all of
your unique holiday gifts! Buy at http://shopping.yahoo.com
or bid at http://auctions.yahoo.com
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users



RE: Getting Perl to fill in requested data for a dos program

2001-12-10 Thread Edwards, Mark (CXO)

I'm not sure you can do it from Perl after the DOS exe starts.  You can
do it when you first start the program with piping or redirection if the
program uses STDIN.  If there is only one line of input required use
system(echo John Doe | prog.exe).  If, for example, you need to enter
name, age and favorite color use redirection from a file.

The Perl script can create prog_input.txt containing:
John Doe
25
red

Then use system(prog.exe  prog_input.txt).

This won't work of the program uses console IO.  Not pure Perl but it
may do what you want.

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 12:12 PM
To: [EMAIL PROTECTED]
Subject: Getting Perl to fill in requested data for a dos program




Hi,

I'm trying to get perl to give input to a dos program.  Here's a
description of
what I want it to do:

1. I want to have perl kick off a dos program that doesn't accept
command line
parameters.
2. The Dos program, that perl will have started, will then prompt the
user for
input like Enter Name:
3.  I want Perl to fill in what the program is asking for on the screen,
and
then send a carriage return.

Any ideas?

Thanks in advance,
Jeff


___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users