Sign in to follow this  
Followers 0

Cygwin and WinGetText("")

5 posts in this topic

Posted

I'm using AutoIt v3 to automate some logins and file copying etc. in CYGWIN. The CYGWIN screen looks similar to a DOS command screen, but accepts Linux commands. Everything works great using CYGWIN except running WinGetText(""). I've tried using the screen title too. When I use this function I just get back "" (nothing). Is there any way to read the text from a CYGWIN screen?

Share this post


Link to post
Share on other sites



Posted

Have you tried ControlGetText()?

Share this post


Link to post
Share on other sites

Posted (edited)

Not going to work either, it is a command window, check your task manager you'll see a cmd process running.

cmd opens the bash

Edited by gafrost

Share this post


Link to post
Share on other sites

Posted (edited)

If you use the AutoIt3 beta, you can run BASH in interactive mode (that is with a -i ) with the Run function and read the output using StdoutRead and StderrRead. It would be best if you used a shell script(s) to automate the input, but you could also send input to BASH using StdinWrite.

I don't have Cygwin installed here, I'll try to remember to post a tested example from home...

Edited by DaveF

Share this post


Link to post
Share on other sites

Posted

Thanks, got it to work!

When sending commands to cygwin bash by way of Autoit3 I added writing to stdout and stderr and then used Autoit3 again to read the error file which gets created newly after every command that fails (non failed commands blanked the file, great!). Works perfect every time.

I'm not sure why everyone else said it couldn't be done, you rule!

Thanks Again!

BTW - I didn't use the Beta version and it still worked.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0