hammingus Posted April 21, 2008 Share Posted April 21, 2008 HI, I am new to AutoIT and trying to create a basic script to install several applications. I have been busting my head trying to resolve something probably very simple so thought I would admit defeat and ask an expert! Two of the apps I have added to the script have 1 setup window which I am unable to "activate". All others are ok. I am using "WinWaitActive" command with correct syntax and obtained Title from Info window. I also tried WinActive but it doesn't seem to like the Title! Is there anything wrong with the below? And if not, why would the "Start Copying Files" window not be activating? When it stops, I just click on it, hit N on keyboard and it completes. Run("D:\setup.exe") WinWaitActive("Start Copying Files") Send("!N") WinWaitActive("Setup Complete") Send("{ENTER}") Thanks to anyone who reads! Link to comment Share on other sites More sharing options...
Tapeworm Posted April 21, 2008 Share Posted April 21, 2008 your example should work... but try this: Run("D:\setup.exe") Do Winactivate("Start Copying Files") Sleep(50) ;processor friendly loop Until Winactive("Start Copying Files") ;this loop will keep trying to activate your window until it becomes active, kind of like WinWaitActive Send("!n") Do Winactivate("Setup Complete") Sleep(50) Until Winactive("Setup Complete") Send("{ENTER}") What does alt + N do? maybe that is the problem, you want to press "n" right? Send("!N") does alt + n, try changing it to Send("n") hope i understood the problem correctly 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