Jump to content

Recommended Posts

Posted

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

Posted

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
Posted

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.

Posted

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...