perryintokyo Posted February 17, 2008 Share Posted February 17, 2008 Hi Everyone, I'm a new member here and just came across this forum. Wondering if anyone can give me a little help here: I have a 3rd party application, says ABC.exe, when it starts, it pops up a login screen with 2 fields "userID" & "password", plus of course an "LOGIN/OK" button. I need to automate the startup/login and shutdown via a batch file. I assume AutoIT can handle this request easily; however I've been researching on this forum for few hrs but can't find what I need. Can anyone give me some directions plz? many thx... - Perry Link to comment Share on other sites More sharing options...
covaks Posted February 17, 2008 Share Posted February 17, 2008 It doesn't get much more simple than that. Look at the following in the helpfile: WinActive ControlSend ControlClick Your code may end up looking something like this: While 1 If WinActive(<the login window>) Then ControlSend(<login window>,"",<username control>,<username>) ControlSend(<login window>,"",<password control>,<password>) ControlClick(<login window>,"",<login/ok button>) ExitLoop EndIf sleep(1000) Wend Link to comment Share on other sites More sharing options...
rmarino Posted February 17, 2008 Share Posted February 17, 2008 Did you check to see if the executable has options that allow for a user name and password to passed to it? If not then above poster's example is good. Link to comment Share on other sites More sharing options...
perryintokyo Posted February 18, 2008 Author Share Posted February 18, 2008 Thanx to both of you. I've been reading the docs since yesterday, the more I know about AutoIT, the more I find it really powerful. Everything seems to make more sense now. Loving AutoIT now. cheers. 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