delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/04/14/21:20:31

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; q=dns; s=default; b=Y2t
2vpNpPjbA0vfP9wUwjYJXm9aFTAzzekuH++b0nuMKB1j69kZYNKxtlaGzghmh32p
Ul63vh+cGxqsWG4baLrNFKkr5PkL+sy6Gi/JRfqFS8zrhx/Bjs2Q/pv9UjRD5MMx
z5irPQAQaEVWm62uSqGUTJzS90nb3qTT25tu1SOY=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:to:from:subject:date:message-id:mime-version
:content-type:content-transfer-encoding; s=default; bh=QCCCKWaIK
1E1Zkm88KzrjS+4zgo=; b=wtU5pwbGHAJu61QQv8++ime+/tzCzmBsG+dtyJysW
jO6m5HDoQZotTLEeUcwN0Gvj+HMrE3wEhX6iFil8juDTaTGDObjXbxiMvvrDpDtS
d+WUbvzWR+SxNNim2gIGUhpzu6t0o+AH0k564RUUrKUgVdICv+oPLjkaA93Bp5kq
Ic=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.0 required=5.0 tests=AWL,BASE64_LENGTH_79_INF,BAYES_00,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2
X-HELO: plane.gmane.org
To: cygwin AT cygwin DOT com
From: Keith Proctor <keith_proctor AT filemaker DOT com>
Subject: Cannot change console mode during usage of expect
Date: Wed, 15 Apr 2015 01:17:09 +0000 (UTC)
Lines: 1
Message-ID: <loom.20150415T025305-586@post.gmane.org>
Mime-Version: 1.0
User-Agent: Loom/3.14 (http://gmane.org/)
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id t3F1KSkx013642

Hello, my name is Keith Proctor.  I test FileMaker Server and I have written 
a test suite on Macintosh. The tests work beautifully on  Macintosh. I’m trying
to Use Cygwin on Windows to reduce the amount of rewriting that I must do 
on the Windows side.    The test includes a dynamically created interactive call
that uses expect to spawn fmsadmin and then interact with fmsadmin by 
providing a user name or a password.  An example is below:

expect -c "spawn fmsadmin open -y -u userName
expect -r .+:
send myPassword\r
interact"

The issue is that the following phrases appear and won’t allow my interactive 
expect command to continue.

GetConsoleMode	// prints once
SetConsoleMode	// prints once
ReadConsoleInput	// spews while collecting input from the command line.

Perform the actions of the script above by hand in the Cygwin CLI does NOT 
cause an issue.  The issue only happens when using expect.  I have tried 3
shells so far (mintty, bash, rxvt).  Are there more?  Mintty provides access to
the terminal types.  So far I have tried xterm-256, vt100, vt120.

An example of the code looks like:

   fdwMode = ENABLE_WINDOW_INPUT | ENABLE_MOUSE_INPUT
          | ENABLE_PROCESSED_INPUT; 
   if (! SetConsoleMode(hStdin, fdwMode) )
		// print error to console

Since FileMaker Server runs on Macintosh or Windows it is doubtful that
I can get a change made in the fmsadmin application. I’m new to CygWin
so I’m hoping that I’ve missed a setting somewhere or maybe I need to
install another module.  

Help me Obi-Wan your my only hope.  ;)

Keith

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019