Jump to content

Set Window Focus


Recommended Posts

I am trying to use AutoIt to somewhat automate an installer. Unfortunately the script gets paused because the window will show up but it is not active. Here is my script:

 

Run (setup.exe)
;Bring window into focus
WinActivate ("Patterson Imaging - InstallShield Wizard", "&Next >")
;Wait until window is in focus to continue script
WinWaitActive ("Patterson Imaging - InstallShield Wizard", "&Next >")
;Welcome screen
Send ("!n")
;License Agreement
Send ("!n")
Sleep (7000)
;License Key
Send ("!n")
Sleep (7000)
;License Type
Send ("!n")
Sleep (7000)
;Image Server Name
Send ("!n")
Sleep (7000)
;Summary
Send ("!n")
;Install
Send ("!i")

 

I can see the window when setup.exe launches, but i need to click on it once to have the script continue. What am i doing wrong? 

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