Azu Posted July 21, 2006 Share Posted July 21, 2006 Sorry if this has been asked before but I couldn't find anything on it.. I'm wandering how I can make an if statement that will stay in effect the while time the script is running, and not hold up the script.. Like for example, if a certain window becomes active, minimize the window And it would do it every time that if statement is fulfilled.. and in the mean time the rest of the script will run un-effected.. Can someone please explain to me how to do this? :S Link to comment Share on other sites More sharing options...
Simucal Posted July 21, 2006 Share Posted July 21, 2006 Sorry if this has been asked before but I couldn't find anything on it..I'm wandering how I can make an if statement that will stay in effect the while time the script is running, and not hold up the script..Like for example, if a certain window becomes active, minimize the windowAnd it would do it every time that if statement is fulfilled.. and in the mean time the rest of the script will run un-effected..Can someone please explain to me how to do this? :SLook up adlibenable in the help file. It will call a function every X milliseconds. You can have that function do whatever you want. AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc) Link to comment Share on other sites More sharing options...
Azu Posted July 22, 2006 Author Share Posted July 22, 2006 Thanks for the fast reply.. exactly what I was looking for ^^ Link to comment Share on other sites More sharing options...
cdr Posted July 22, 2006 Share Posted July 22, 2006 (edited) Like for example, if a certain window becomes active, minimize the window What about $done = False While Not $done WinWaitActive( "foo" ) WinSetState( "foo", "", @WIN_MINIMIZE ) WinActivate( "someotherwindow" ) ; do whatever else ; set $done if we want to stop WEnd If you want to do other things in the meantime, launch it in a seperate thread, like http://www.autoitscript.com/forum/index.php?showtopic=23545. Edited July 22, 2006 by cdr 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