Jump to content

limit time for a function


Recommended Posts

Can you post a recreation of this? Because I've never experienced this problem.

MCR.jpg?t=1286371579

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

Link to comment
Share on other sites

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)

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...