Jump to content

Automatic login and exit


Recommended Posts

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

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

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