ZetupEXE Posted October 26, 2010 Posted October 26, 2010 Hi there, i've just a little question. When programming some autoit with scite and i.e. an Array has incorrect subscribtion or range exceeded, scite will tell me in which line the error occours. if i have a compiled script there will be a messagebox with autoit headline, and also a line, where the error occured, but the linenumber is much higher than in scite (quess it's because the includes). how can i have an own errormessage when script is compiled? thx, for your hints cu.. Zetup-EXE
JohnOne Posted October 26, 2010 Posted October 26, 2010 You should add your own error checking to your code, and some other code to handle it. Look at @error macro in the help file, which is a massive help. of you can create your own which is good practice anyway. For example (and this may not be the best example) run this script, then uncomment, and run it again. Local $aNumbers[5] = [1,2,3,4,5] For $i = 1 To 5 ;If $i > UBound($aNumbers) -1 Then ;check if the count exceeds the bounds of the array ; MsgBox(0,"error","Unable to proccess count number " & $i ) ; Exit ;EndIf Tooltip($aNumbers[$i]) Sleep(1000) Next AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
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