CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



swabbies
Novice

May 16, 2003, 1:35 PM

Post #1 of 5 (3849 views)
need help with win32 cmd line interaction Can't Post

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

Post #2 of 5 (3844 views)
Re: [swabbies] need help with win32 cmd line interaction [In reply to] Can't Post

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

Post #3 of 5 (3841 views)
Re: [Paul] need help with win32 cmd line interaction [In reply to] Can't Post

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

Post #4 of 5 (3840 views)
Re: [swabbies] need help with win32 cmd line interaction [In reply to] Can't Post

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

Post #5 of 5 (3838 views)
Re: [swabbies] need help with win32 cmd line interaction [In reply to] Can't Post

Dave told you, print a newline - \n

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives