Sign in to follow this  
Followers 0
hammingus

New User

2 posts in this topic

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!

Share this post


Link to post
Share on other sites



your example should work... but try this:

Run("D:\setup.exe")

Do

Winactivate("Start Copying Files")

Sleep(50) ;processor friendly loop :D

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 :D

Share this post


Link to post
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
Sign in to follow this  
Followers 0