applesman Posted January 27, 2008 Share Posted January 27, 2008 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. Link to comment Share on other sites More sharing options...
Squirrely1 Posted January 30, 2008 Share Posted January 30, 2008 (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. Edited January 30, 2008 by Squirrely1 Das Häschen benutzt Radar 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