Arclite86 Posted October 9, 2015 Posted October 9, 2015 somethime a function takes to much time it may get stuck or just fail, is there a way to limit the time for a function so it can continue running the next functions?
Damein Posted October 9, 2015 Posted October 9, 2015 Can you post a recreation of this? Because I've never experienced this problem. Most recent sig. I made Quick Launcher W/ Profiles Topic Movie Database Topic & Website | LiveStreamer Pro Website | YouTube Stand-Alone Playlist Manager: Topic | Weather Desktop Widget: Topic | Flash Memory Game: Topic | Volume Control With Mouse / iTunes Hotkeys: Topic | Weather program: Topic | Paws & Tales radio drama podcast mini-player: Topic | Quick Math Calculations: Topic
Valuater Posted October 9, 2015 Posted October 9, 2015 You can add "error checking" to exit the function. 8)
Arclite86 Posted October 9, 2015 Author Posted October 9, 2015 no its not an error i have an function that i got from a previous post, but because this is a new subject/question i started this one this is the script: Global $websiteread, $PingTimeout = 2000 Func _UrlExists($websiteread) If (StringLen(InetRead($websiteread, 1)) > 0) Then Return 1 If Ping($websiteread, $PingTimeout) Then Return 2 Return 0 EndFunc ;==>__checkConn If _UrlExists($websiteread) Then ConsoleWrite("Exists" & @LF) ContinueLoop EndIf ConsoleWrite("Not Exists Or No Response in " & @LF) ConsoleWrite("not Exists" & @LF) when this happens it works fine in less then a second (bellow) If _UrlExists($websiteread) Then ConsoleWrite("Exists" & @LF) but when this happens it can take up to 5 second, so i want it to skip after because it wil take to much time if you run this in a full script (bellow) EndIf ConsoleWrite("Not Exists Or No Response in " & @LF) ConsoleWrite("not Exists" & @LF)
kylomas Posted October 10, 2015 Posted October 10, 2015 Go look at my response in your original thread... Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill
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