Anshul

Detect text displayed in the putty window

5 posts in this topic

The Auto it window info tool is not able to detect he text displayed in the putty window. Is this the limitation of Auto It ?

My problem is that I want to type commands in putty depending upon the result of the last commands executed. I don't want to use sleep function to insert delay instead I want to wait till a specific text appears in the putty window. But Auto it window info tool is not able to detect he text displayed in the putty window.

I hope you know what putty is . Please find the screen shot of the putty window attached. In the current window any text inside the window example "login as" is not detected by Auto it window info tool and hence I cannot use winwait() function.Please help ...

post-61476-0-94454300-1290707656_thumb.g

Share this post


Link to post
Share on other sites



I have never used the software myself, but from what I've heard there is a command line version of Putty called Plink.

If you use Plink instead I believe you should be able to read from and write to the program using the STD I/O functions.

Share this post


Link to post
Share on other sites

Quite difficult what you want.

One way to go is to use plink as Tvern said (haven't used that yet but it might work).

Putty (like TeraTerm) doesn't have any identified controls so you cannot read from there.

Before going further let me ask you something: how important is "putty" for you? You want to use it because it is a freeware or because is the one you want to use?

There is an alternative (freeware too) which is TeraTerm. Very putty-like and a very good piece of software. The difference? If you use the "logging" feature of TeraTerm, it updates the log in real-time; so what you see on the screen can be read from the log - it becomes a simple matter of reading a text file, which is much easier.

As I said, conside using plink first.


SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

The Auto it window info tool is not able to detect he text displayed in the putty window. Is this the limitation of Auto It ?

Probably related or same reason as #1746 Edited by MvGulik

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

Share this post


Link to post
Share on other sites

I found out that there logging facility in putty as well so I made changes in my program so that it waits until certain text appears in the log file.

and it works wonderfully well :graduated:

@enaiman ,@Tvern Thanks a lot for your suggestions :(

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