Arclite86 1 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? Share this post Link to post Share on other sites
Damein 19 Posted October 9, 2015 Can you post a recreation of this? Because I've never experienced this problem. Most recent sig. I madeQuick 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 Share this post Link to post Share on other sites
Valuater 129 Posted October 9, 2015 You can add "error checking" to exit the function. 8) Share this post Link to post Share on other sites
Arclite86 1 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) Share this post Link to post Share on other sites
mikell 1,007 Posted October 9, 2015 You can't set a timeout for InetRead Share this post Link to post Share on other sites
kylomas 415 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 Share this post Link to post Share on other sites