Tamaro Posted May 10, 2006 Share Posted May 10, 2006 I'm trying to automati some data entry on a SSH session in putty but, i cant get the enter or tab key to work it stays on one field. here is the code i'm using WinWaitActive("**************** - PuTTY") Send("05/004/2006") Send("{ENTER}") Send("Y") Send("{ENTER}") Send("RXC05") Send("{ENTER}") Send("**-***-****") Send("{ENTER}") Send("01") Send("{ENTER 2}") Send("HICL") Send("{ENTER}") Send("*************") Sleep(10000) Send("PA") Send("{ENTER 6}") Send("15") Send("{ENTER 4}") Send("T") Send("{ENTER 5}") Send("APPROVED") Send("{ENTER 7}") Send("{F8}") Send("{ENTER 9}") Send("Y") Send("{F3}") Send("{F4}") Any help would be appreciated. Link to comment Share on other sites More sharing options...
MadSc13ntist Posted May 10, 2006 Share Posted May 10, 2006 (edited) I'm trying to automati some data entry on a SSH session in putty but, i cant get the enter or tab key to work it stays on one field. here is the code i'm usingAny help would be appreciated.Have you seen the function ControlSend()? you can send keys to a specific control (i.e. inputbox, button, radio-button, check-box, etc.) instead of using Send(). This will give your script some added stability. You can use the Au3Info.exe tool to find the control names you wish to use in a window/GUI.As for the enter key not working, i suspect that the focus is being lost somehow or the keystrokes are being entered too quickly for putty and only appear to come up short. Also try to get away from Sleep(), this can cause unexpected problems when a system gets slow for a moment and then Send()'s the wrong sequence of commands/functions. Try to hook an event like using WinWait(), WinExists(), etc. Edited May 10, 2006 by MadSc13ntist Link to comment Share on other sites More sharing options...
seandisanti Posted May 10, 2006 Share Posted May 10, 2006 Also try to get away from Sleep(), this can cause unexpected problems when a system gets slow for a moment and then Send()'s the wrong sequence of commands/functions. Try to hook an event like using WinWait(), WinExists(), etc.alot of times you can use status bar messages to trigger continuance also. like i used to automate a telnet client at my old job, and i used the cursor position in the status bar to let my script know it was ok to continue. Link to comment Share on other sites More sharing options...
CyberSlug Posted May 10, 2006 Share Posted May 10, 2006 You might need to tweak Opt("SendKeyDelay", ... I used AutoIt with putty a long time ago, and I think I had to lower the send speed or hard code sleep delays for it to work reliably. Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
Tamaro Posted May 10, 2006 Author Share Posted May 10, 2006 (edited) It work's thanks a lot. Edited May 10, 2006 by Tamaro Link to comment Share on other sites More sharing options...
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