hoang anh Posted May 19, 2006 Posted May 19, 2006 While running my program, Autoit report me this error, but i dont understand and dont know why. Sleep(5000) Error: Recursion level has been exceeded - AutoIt will quit to prevent stack over flow My code : func hunt() send("{F8}") sleep(5000) send("{F9}") endfunc
HardCopy Posted May 19, 2006 Posted May 19, 2006 Your Code you offered is fine, Its the code calling this function that has the problem. There is a recursion limit in autoit (Someone else more qualified can explain), and your OTHER code is hitting it. Show the rest and we may be able to offer assistance. HardCopy Contributions: UDF _DateYearFirstChildren are like Farts, you can just about stand your own.Why am I not a Vegetarian?...Well...my ancestors didn't fight & evolve to the Top of the food chain for me to survive on Salad
hoang anh Posted May 19, 2006 Author Posted May 19, 2006 Func _IsPressed($hexKey) Local $aR, $bO $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then $bO = 1 Else $bO = 0 EndIf Return $bO EndFunc If _IsPressed('01') = 1 Then hunt(); if or While better than ?? func hunt() send("{F8}") sleep(5000) send("{F9}") endfunc I wanna " sleep(5000) " while left mouse click, but seem cant use this code . plz help me!
hoang anh Posted May 20, 2006 Author Posted May 20, 2006 Plz help me !!!!!!!!!!!!!!!! How fix this error ??
Valuater Posted May 20, 2006 Posted May 20, 2006 maybe... While 1 If _IsPressed('01') = 1 Then hunt(); if or While better than ?? Sleep(10) WEnd Func hunt() Send("{F8}") Sleep(5000) Send("{F9}") EndFunc ;==>hunt Func _IsPressed($hexKey) Local $aR, $bO $hexKey = '0x' & $hexKey $aR = DllCall("user32", "int", "GetAsyncKeyState", "int", $hexKey) If Not @error And BitAND($aR[0], 0x8000) = 0x8000 Then $bO = 1 Else $bO = 0 EndIf Return $bO EndFunc ;==>_IsPressed 8)
hoang anh Posted May 21, 2006 Author Posted May 21, 2006 Oh, i did it ago, but I got this error: Error: Recursion level has been exceeded - AutoIt will quit to prevent stack over flow How fix it ?
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