Hest Posted April 3, 2009 Share Posted April 3, 2009 (edited) Ok, I'm not sure how to explain this, but here goes.. I have a program with a button that acts like start and stop for a stopwatch. Press start sets Running=1 pressing stop sets it to 0. easy enough. When I press stop, the time_label updates with the time it took and it all works fine. Now I want to update the label while the time is ticking, but if I make a "while running = 1", the program keeps running through the loop and doesn't notice any button clicks anymore. Is it possible to do some kind of loop that runs in the background, while the rest of the script runs? Edited April 4, 2009 by Hest Software:Model Train Calculator (Screen)Autoit3 beginner! Link to comment Share on other sites More sharing options...
Xenobiologist Posted April 3, 2009 Share Posted April 3, 2009 Hi, have a look at AdlibEnable or just make an If condition in your main loop. Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
picea892 Posted April 3, 2009 Share Posted April 3, 2009 Adlibenable is probably what you need. Another solution could be to add this to the while loop you presently have. global $refreshing $refreshing=1+$refreshing if $refreshing=30 then refresh() $refreshing=1 EndIf Link to comment Share on other sites More sharing options...
Hest Posted April 4, 2009 Author Share Posted April 4, 2009 Thx alot to both of you. Working now Software:Model Train Calculator (Screen)Autoit3 beginner! 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