This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cannot change console mode during usage of expect

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

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:

   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.  ;)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]