Home: Perl Programming Help: Win32 Programming Help:
need help with win32 cmd line interaction



swabbies
Novice

May 16, 2003, 1:35 PM


Views: 6454
need help with win32 cmd line interaction

Hello, I am attempting to call a win32 cmd line .exe from Perl. The .exe works in the fashion that it runs until the user puts focus on the cmd line window and presses the letter "q". I can't seem to figure out how to make this happen in perl. For example I start my code the following way, but I can't get the letter que to be passed to the command line. The trick is that the letter isn't supposed to be on the line (c:\q) it is used as a break in the exe. Is it possible to pass an .exe a letter without it being on the command line itself?


open(CDB,"|cdb.exe -g -g frsstress.exe /cfgfile stress.xml") or die "Unable to start cbd...";

sleep(60);

print "q"; ###this is where I want the program to exe to break via the letter q.


Any help would be greatly appreciated.
thanks,
Ben


Paul
Enthusiast

May 16, 2003, 3:21 PM


Views: 6449
Re: [swabbies] need help with win32 cmd line interaction

Duplicate posts suck. Dave gave you the answer here...

http://perlguru.com/gforum.cgi?post=20292;sb=post_latest_reply;so=ASC;forum_view=forum_view_collapsed;;page=unread#unread


swabbies
Novice

May 16, 2003, 3:25 PM


Views: 6446
Re: [Paul] need help with win32 cmd line interaction

hey paul,

thanks for the encouragement.

The response that Dave gave didn't work for my circumstance. So I thought I would rephrase it. I guess I will look elsewhere.

thanks,

Ben


swabbies
Novice

May 16, 2003, 3:27 PM


Views: 6445
Re: [swabbies] need help with win32 cmd line interaction

if you read closely they are two different questions. One is about passing the "return" key and one is about passing the letter "q" and having it pass NOT on the cmd line.

thanks,

Ben


Paul
Enthusiast

May 16, 2003, 3:31 PM


Views: 6443
Re: [swabbies] need help with win32 cmd line interaction

Dave told you, print a newline - \n