Sign in to follow this  
Followers 0
applesman

Ok need some help[Winwaitactive]

2 posts in this topic

Hello, im new to the whole autoit and i have been trying to make something that will close the a game when a disconnected from server sign shows up on the screen. When using the autoit window finder tool it shows it as the same window as the game. Is their anyway to do WinWaitActive so that when a image pops up on screen(disconnect from server) it will become active then to click okay. Please let me know asap.

Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

This will probably close both windows including the application:

$WinTitle = "title as seen in Titlebar of your main app"
WinActivate($WinTitle)
Sleep(2700)
WinWaitActive($WinTitle, "", 10)
Sleep(1300)
WinClose($WinTitle)

Try it twice and if the script still doesn't work, then replace the words "WinClose" with "WinKill" and try again. The lines that start with "Sleep" may not be necessary - it's hard to say - and they make the script take at least 4 seconds to complete. :D

Edited by Squirrely1

Das Häschen benutzt Radar

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