X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-0.3 required=5.0	tests=AWL,BAYES_50,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
In-Reply-To: <4C7FC3B4.1060606@cygwin.com>
References: <20100902074703.GA11464@gaston.couberia.bzh> <4C7FC3B4.1060606@cygwin.com>
To: cygwin@cygwin.com
MIME-Version: 1.0
Subject: Re: simulating console input
X-KeepSent: 908B5DCD:CC6A54F1-85257792:0074780B; type=4; name=$KeepSent
Message-ID: <OF908B5DCD.CC6A54F1-ON85257792.0074780B-85257792.0074F175@lnotes-gw.ent.nwie.net>
From: RISINGP1@nationwide.com
Date: Thu, 2 Sep 2010 17:17:18 -0400
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

>On 9/2/2010 3:47 AM, Peter M=FCnster wrote:
>> Hello,
>>
>> I would like to run a Dos program, that needs keyboard input (just one=
=20
"Y"),
>> automatically via "make" in an ssh-session.
>>
>> How could I simulate the "Y" keypress?
>>
>> "echo Y | DosProgram.exe" does not work...
>>
>> The keypress is accepted only in a dos-console.
>
>Read <
http://cygwin.com/cygwin-ug-net/using-effectively.html#using-console>.
>Then add this fact - the SSH server uses ptys.  So your program will not
>work with a single character put in the input buffer.  One could
>envision using 'yes' to fill the buffer of the pipe that the Windows=20
program
>interprets the pty to be.  Perhaps a nicer alternative is to build the
>problematic program with Cygwin, if that's an option, so that it will
>understand the pty.

Would an inline document work?

DosProgram.exe <<!
Y
!

- Phil
____________________________________________________________________
Phil Rising, Principal Consultant for Sogeti USA, LLC
Contracted to Nationwide, Corporate Internet and Contact Center Solutions=
=20
Team
(Work) (614) 677-7445, (Fax) (614) 677-7046
Alternate email: Phil.Rising@us.sogeti.com

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

