faldo Posted December 10, 2005 Share Posted December 10, 2005 (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 December 10, 2005 by faldo Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API Link to comment Share on other sites More sharing options...
Developers Jos Posted December 10, 2005 Developers Share Posted December 10, 2005 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 EndFuncFirst 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. Link to comment Share on other sites More sharing options...
faldo Posted December 10, 2005 Author Share Posted December 10, 2005 (edited) How is the variable $Value set ?The value is gathered from outside the script and is changeing all the time, when it becomes a 2 or over, this script should react and do something else.Is there a way to do such "check" nonrecursively? Edited December 10, 2005 by faldo Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API Link to comment Share on other sites More sharing options...
w0uter Posted December 10, 2005 Share Posted December 10, 2005 Func Check() While $Value <> 1 Then sleep(500) Wend nextfunction() EndFunc My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
GaryFrost Posted December 10, 2005 Share Posted December 10, 2005 another option might be adlib for example AdlibEnable("Check",500) Func Check() if $Value > 1 Then AdlibDisable() nextfunction() EndIf EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
faldo Posted December 11, 2005 Author Share Posted December 11, 2005 Thanx w0uter, "while" worked good... adlib still gives the recusion error. Check out my other scripts: RDP antihammer/blacklist generator | Phemex cryptocurrency exchange API 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