Jump to content

Recommended Posts

Posted (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 by Hest
Software:Model Train Calculator (Screen)Autoit3 beginner!
Posted

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

Posted

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

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
×
×
  • Create New...