Jump to content

click in current window


morgun
 Share

Recommended Posts

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)

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

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

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...