Jump to content

Cygwin and WinGetText("")


kweiss
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 14 years later...
  • Moderators

@CiaronJohn did you happen to notice this thread is over 14 years old? Or that kweiss has not been here for just as long? Please don't resurrect old threads.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...