Sign in to follow this  
Followers 0
morgun

click in current window

5 posts in this topic

Hi I am new here and I think this will be really easy question

I try to make small script to change settings in Putty. But the click do not click in current window but into WINDOWS.

I means this should click to position 50,15 in opened Putty. But it clicks into 50,15 of desktop. Do I miss something? Script is below:

Run("D:\putty.exe -telnet 127.0.0.1 2002")

WinWaitActive("127.0.0.")

Send("sh run{ENTER}")

MouseClick("right", 50, 15)

Share this post


Link to post
Share on other sites



thanks.

This takes inta window and I need to click at title bar. But it works with -15 as y

Opt("MouseCoordMode", 2)

Run("D:\putty.exe -telnet 127.0.0.1 2002")

;WinWaitActive("PuTTY")

Sleep(500)

Send("{ENTER}en{ENTER}")

Sleep(500)

Send("{ENTER}en{ENTER}")

Sleep(500)

Send("sh ip route{ENTER}")

Sleep(500)

Send("sh run{ENTER}")

MouseClick("right", 50, -15)

Share this post


Link to post
Share on other sites

I tried it also with number 3. It clicked again into desktop. It does not matter 2 is fine for me.

Have you ever used putty? I tried to winwait for text in output, but it does not get it. I mean a type

sh run

and wait for R1#

WinWaitActive("Console port", "R1#")

Send("back alive")

Maybe there is a problem with putty, that Autoit can not read in putty output. Something very similar worked fine in automated installation of some application.

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