Jump to content
Sign in to follow this  
Tyranlol

Another Recursion Error

Recommended Posts

Tyranlol

Tyranlol,

I still see no reason why you get a recursion error. What is the exact error message that you get? :)

M23

Hai :)

I get the typical "Recursion level has been exceeded - AutoIt will quit to prevent stack overflow"


[u]Only by Attempting the Impossible You Can Earn the Remarkable[/u]

Share this post


Link to post
Share on other sites
kaotkbliss

What are you doing with "and $var"? according to the helpfile, ping returns a time in miliseconds, not a bool. I bet this is causing your program to enter the SetSettings func every loop, causing the recursion.

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
Melba23

Tyranlol,

Let us do some errorchecking. Add this at the top of your script:

Global $sLogFile = @ScriptDir & "\Logfile.txt"
Global $iLogState = 0

And then add this as the first 2 lines of all your functions - replacing the Function_Name as required:

$iLogState += 1
FileWriteLine($sLogFile, $iLogState & "- Function_Name" & @CRLF)

And then add this before a Return or at the end of the function:

$iLogState -= 1

We use the full filename to make sure the file is opened and closed each time and we do not lose any data when (if?) the error occurs.

Now run the script for a while and we might be able to work out which function is causing the error by looking at the log file. :)

kaotkbliss,

Ping will return 0 if there is an error, which AutoIt reads as False. Any value other then 0 (ie a valid return) wil be read as True, so I do not think that is a problem:

For $i = 1 To 20

    ; Get a True/False value
    $iRand = Random(0, 1, 1) 
    ; Set the True value to any integer
    If $iRand Then $iRand = Random(1, 5000, 1)
    ; $iRand should now be similar to the Ping return, so test it
    If $iRand Then
        ConsoleWrite("Rand should exist : " & $iRand & @CRLF)
    Else
        ConsoleWrite("Rand should = 0 : " & $iRand & @CRLF)
    EndIf

Next

Besides, even if it does go into the loop the flow should reverse it out again. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
kaotkbliss

M23 - Gotcha. I'm used to working with a program that is very specific so if a return is not specified beforehand as bool, the output cannot be read as bool :)


010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Share this post


Link to post
Share on other sites
Tyranlol

Sorry for the late answer M23, life called :)

I think i solved the problem with your method. Apparently SetSettings() wasn't called correctly, so i build it into Mail() and it seems to work :)

Thanks again for all your help!

Edited by Tyranlol

[u]Only by Attempting the Impossible You Can Earn the Remarkable[/u]

Share this post


Link to post
Share on other sites
Melba23

Tyranlol,

Errorchecking is always a good way to go. Glad you got it sorted. :)

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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  

×