Sign in to follow this  
Followers 0

Cygwin and WinGetText("")

5 posts in this topic

#1 ·  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



#2 ·  Posted

Have you tried ControlGetText()?


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

#3 ·  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

SciTE for AutoItDirections for Submitting Standard UDFs


Don't argue with an idiot; people watching may not be able to tell the difference.

Share this post


Link to post
Share on other sites

#4 ·  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

Yes yes yes, there it was. Youth must go, ah yes. But youth is only being in a way like it might be an animal. No, it is not just being an animal so much as being like one of these malenky toys you viddy being sold in the streets, like little chellovecks made out of tin and with a spring inside and then a winding handle on the outside and you wind it up grrr grrr grrr and off it itties, like walking, O my brothers. But it itties in a straight line and bangs straight into things bang bang and it cannot help what it is doing. Being young is like being like one of these malenky machines.

Share this post


Link to post
Share on other sites

#5 ·  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