Tyranlol Posted April 4, 2011 Author Share Posted April 4, 2011 Tyranlol,I still see no reason why you get a recursion error. What is the exact error message that you get? M23Hai 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] Link to comment Share on other sites More sharing options...
kaotkbliss Posted April 4, 2011 Share Posted April 4, 2011 (edited) 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 April 4, 2011 by kaotkbliss 010101000110100001101001011100110010000001101001011100110010000 001101101011110010010000001110011011010010110011100100001 My Android cat and mouse gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 4, 2011 Moderators Share Posted April 4, 2011 Tyranlol,Let us do some errorchecking. Add this at the top of your script:Global $sLogFile = @ScriptDir & "\Logfile.txt" Global $iLogState = 0And 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 -= 1We 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 NextBesides, 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
kaotkbliss Posted April 4, 2011 Share Posted April 4, 2011 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 gamehttps://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek We're gonna need another Timmy! Link to comment Share on other sites More sharing options...
Tyranlol Posted April 5, 2011 Author Share Posted April 5, 2011 (edited) 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 April 5, 2011 by Tyranlol [u]Only by Attempting the Impossible You Can Earn the Remarkable[/u] Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 5, 2011 Moderators Share Posted April 5, 2011 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 Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
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