Guest radk Posted May 28, 2004 Share Posted May 28, 2004 I am new to AutoIT, and I have been using it for a week or two. The Question: Is it possible in AutoIT to enter characters into Windows command interpreter, cmd.exe? Any suggestions or help is greatly appreciated. Simple Example, Start cmd.exe, and execute the command dir. Thank You, Rad Link to comment Share on other sites More sharing options...
scriptkitty Posted May 28, 2004 Share Posted May 28, 2004 You can run directly if you like as well. run(@comspec,"") winwait(@comspec) controlsend(@comspec,"","","dir{enter}") sleep(1000) controlsend(@comspec,"","","!{space}es{enter}") winclose(@comspec) msgbox(1,"Info",clipget()) AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Guest radk Posted May 29, 2004 Share Posted May 29, 2004 My goal was to use an AutoIT script to reset a password on an Unix system using ssh2.exe. run(@comspec,"") winwait(@comspec) controlsend(@comspec,"","","ssh2 -l root 192.168.0.104 passwd admin{enter}") sleep(2500) controlsend(@comspec,"","","t3st1ng{enter}") sleep(2500) controlsend(@comspec,"","","letmein123{enter}") sleep(2500) controlsend(@comspec,"","","letmein123{enter}") sleep(2500) controlsend(@comspec,"","","!{space}es{enter}") winclose(@comspec) msgbox(1,"Info",clipget()) This is a great start. Thanks. Rad 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