Jump to content

Recommended Posts

Posted (edited)

How do i check a value every 0.5 seconds to see if it has changed, without getting a stack overflow? Maybe there is some way to reset the "Recusion level"? :S

Func Check()    
    Sleep(500)
        if $Value > 1 Then
            nextfunction()
        Else
            check()
        EndIf
EndFunc
Edited by faldo
  • Developers
Posted

How do i check a value every 0.5 seconds to see if it has changed, without getting a stack overflow?

Func Check()    
    Sleep(500)
        if $Value > 1 Then
            nextfunction()
        Else
            check()
        EndIf
EndFunc
First of all, you are calling the Check function recursively as long as $Value less or equal 1 and this is done until you called it the maximal times.

How is the variable $Value set ?

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...