Jump to content

_INetGetSource() Locks up program


Recommended Posts

I'm an a really bad Wifi connection, and when I try to use _InetGetSource() the entire program locks up for 2 or 3 mins...

Is there a way to cause it to time-out or something, rather than hanging? On my PC I can replicate the hang using 2 lines of code, the include and the function it's self...

Thanks for any replies. :)

SIGNATURE_0X800007D NOT FOUND

Link to comment
Share on other sites

I'm an a really bad Wifi connection, and when I try to use _InetGetSource() the entire program locks up for 2 or 3 mins...

Is there a way to cause it to time-out or something, rather than hanging? On my PC I can replicate the hang using 2 lines of code, the include and the function it's self...

Thanks for any replies. :)

Hi,

maybe you check first, how long it take, to open the url.

You can set a timeout value for loading.

It makes your script waiting at least the timeout value, but it is maybe better then 2 - 3 min.

You may test the timeout value and change it for loading page.

#include <IE.au3>
$oIE = _IECreate ("myurl.domain.com", 0, 0, 0) ; loading url hidden, don't wait for page loading
$var = _IELoadWait ($oIE, 0, 30000) ; wait for page loading -> timeout 30 sec
_IEQuit ($oIE)
If $var = 1 Then
    _InetGetSource("myurl.domain.com")
Else
    MsgBox (0,"Timeout", "...loading page -> maybe bad connection!")
EndIf

;-))

Stefan

Edited by 99ojo
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...