Jump to content

UDF and include?


Recommended Posts

hello i have some problems with owerflowes in my scribt. a guy told me "You are calling UDFs indefinately without letting them finish."

so i wunder what is a UDF.

here is my scribt if someone wants to see it. (it is kind of long ^^)

; Loop around until the user gives a valid "autoit" answer
Edited by rakarna
Link to comment
Share on other sites

C:\Documents and Settings\Mattias\Skrivbord\Ladderslasher catacomb bot 100% mattias ^^.au3 (140) : ==> Recursion level has been exceeded - AutoIt will quit to prevent stack overflow.:

sleep(1000)

>Exit code: 1 Time: 10971.944

Link to comment
Share on other sites

basically, I think the script needs tidying...

stuff like:

run("C:\Program Files\Mozilla Firefox\firefox.exe"); öppnar fire fox sida
sleep(4000) 
klar                                    
MouseClick("left",394, 58)                     ; klickar på där man skriver in addressen
sleep(100)                                     ;väntar
Send("http://ladderslasher.d2jsp.org/lsfs.html"); skriver in addressen till ladderslasher sidan
sleep(2000)
Send("{ENTER}")

why do this when you could just do:

ShellExecute ("http://ladderslasher.d2jsp.org/lsfs.html")
WinWaitActive ("d2jsp - Ladder Slasher - Mozilla Firefox")

its this kind of stuff that leaves you with more room for error, and means the script actually works under more circumstances. In your script your using way too many constants, use more conditional statements (thats If...Then...EndIf etc.) this will make your script more flexible.

You are just trying to mimic human input, thats ok, but humans can adapt to errors, a script asked to mouse click in a particular place can only click in that place.

also instead of

Call("attack1")

use

attack1 ()

I havent run It as I don't have a clue what ladder slasher is, but just neaten the script and try to get the computer to do what you want it to do, rather than try and make it mimic you.

when you've cleaned it up, it will be easier to see errors.

Link to comment
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
 Share

  • Recently Browsing   0 members

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