Sign in to follow this  
Followers 0
(^_^)

Recursion level

5 posts in this topic

C:\Documents and Settings\Shawn\Desktop\gui\new.au3 (34) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

ok i know its been explained to me that this usully only happens when a func goes to itself but, i know that in my scrip it doesnt, i only get this error when i use the random function,

heres the code

Sleep(3000)
Global $Paused
HotKeySet("{END}", "TogglePause")
HotKeySet("{HOME}", "Terminate")


Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
    WEnd
EndFunc
Func Terminate()
    Exit 0
EndFunc

func dump()
    $count = 1
while $count = 1

    $coord = PixelSearch( 972, 52, 975, 55, 0x393839, 5 )
    If Not @error Then
    $ran = Random(3000, 20000, 1)
    sleep($ran)
        MouseMove(973, 53)
        MouseDown("left")
        MouseMove(600, 50)
        MouseUp("left")
        MouseClick("left")
    EndIf
    $coord = PixelSearch( 972, 52, 975, 55, 0x414041, 5 )
    If Not @error Then
    $ran = Random(3000, 100000, 1)
    sleep($ran)
        MouseMove(973, 53)
        MouseDown("left")
        MouseMove(600, 50)
        MouseUp("left")
        MouseClick("left")
    EndIf
    $count = 2
    $ran = 0
WEnd
move()
EndFunc
Func move()
    Sleep(1000)
Send("{ALTDOWN}")
send("{TAB}")
Send("{ALTUP}")
dump()
EndFunc

dump()

[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

)" data-cid="224660" data-date="Aug 21 2006, 09:34 PM">

ok i know its been explained to me that this usully only happens when a func goes to itself but, i know that in my scrip it doesnt,....

Yes it does...

Move() calls Dump() calls Move() calls Dump() .......

:P

Edited by JdeB

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

ok how whould i loop my script so it wont ever end unless the toggle pause or teminate is hit? so it just moves from window to window lookin for that color's and moving it :P


[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Share this post


Link to post
Share on other sites

)" data-cid="224672" data-date="Aug 21 2006, 09:54 PM">

ok how whould i loop my script so it wont ever end unless the toggle pause or teminate is hit? so it just moves from window to window lookin for that color's and moving it :nuke:

Have a look... give it a try ... have a look again.... read/search.... learn.... have a try again....

Don't ask me to write it for you :P


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

)" data-cid="224672" data-date="Aug 21 2006, 12:54 PM">

ok how whould i loop my script so it wont ever end unless the toggle pause or teminate is hit? so it just moves from window to window lookin for that color's and moving it :P

lol sry dumb question lil hungover :nuke:


[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0