morgun Posted December 31, 2010 Posted December 31, 2010 Hi I am new here and I think this will be really easy questionI 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)
JohnOne Posted December 31, 2010 Posted December 31, 2010 Try Opt("MouseCoordMode", 2) Run("D:\putty.exe -telnet 127.0.0.1 2002") WinWaitActive("127.0.0.") Send("sh run{ENTER}") MouseClick("right", 50, 15) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
morgun Posted December 31, 2010 Author Posted December 31, 2010 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)
JohnOne Posted December 31, 2010 Posted December 31, 2010 (edited) Try 1 instead of 2 flag, which is reletive to the window rather than client of window. Edited December 31, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
morgun Posted December 31, 2010 Author Posted December 31, 2010 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now