Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Cygwin and WinGetText("")


  • Please log in to reply
4 replies to this topic

#1 kweiss

kweiss

    Seeker

  • New Members
  • 3 posts

Posted 10 November 2005 - 06:31 PM

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?







#2 SmOke_N

SmOke_N

    It's not what you know ... It's what you can prove!

  • Moderators
  • 15,730 posts

Posted 10 November 2005 - 06:33 PM

Have you tried ControlGetText()?

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.


#3 GaryFrost

GaryFrost

    I don't need your attitude. I have one of my own

  • Developers
  • 7,854 posts

Posted 10 November 2005 - 06:47 PM

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, 10 November 2005 - 06:55 PM.

SciTE for AutoItDirections for Submitting Standard UDFs

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


#4 DaveF

DaveF

    Smells fanboyish.

  • Developers
  • 640 posts

Posted 10 November 2005 - 07:24 PM

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, 10 November 2005 - 07:25 PM.

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.

#5 kweiss

kweiss

    Seeker

  • New Members
  • 3 posts

Posted 11 November 2005 - 07:23 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users