Jump to content

InetGet Question

Recommended Posts

I have written a small script that utilizes the InetGet function. It works great with one exception, sometimes when it saves the html file to my computer it saves the web page that loads before the one I need. It usually says something like please while this page is loading. Is there any way to stop this from happening?


Link to comment
Share on other sites

Apparently I'm not using the right syntax for the _IELoadWait could you give me an example of how you would use it to download an html?

If you make use of the IE.au3 tools available in Autoit 3.2.+++

it has a load-wait built in for this type of scenario


Link to comment
Share on other sites

An example of one of the links is http://isbn.nu/0345483545

The last number changes depending on what IBSN I am looking for. Sometimes it will go right to the page I need and other times I will get the Please wait We're still waiting for a response from 5 bookstores...

So the code right now looks something like this:

$IBSNNumber = (0345483545)

#include <IE.au3>

InetGet("http://isbn.nu/" & $IBSNNumber, "C:\barcode.html", 1, 0)

Link to comment
Share on other sites

Just by way of testing several IBSN numbers, I chopped of the last two digits from the ISBN in your post and made a sample script that loops thru several ISBN numbers. The Do/Until loop will not quit trying until it gets some page other than the "waiting one" that you mentioned.

Global $i

For $i = 10 To 45
    _GetIt("03454835" & $i)

Func _GetIt($IBSNNumber)
        InetGet("[url="http://isbn.nu/"]http://isbn.nu/[/url]" & _
                $IBSNNumber, "barcode" & $i & _
                ".html", 1, 0)
    Until Not StringInStr(FileRead("barcode" & _
            $i & ".html"), "still waiting for a response from")
EndFunc   ;==>_GetIt

There is probably a better way to do this, but this worked everytime for me.

Edited by herewasplato


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

  • Recently Browsing   0 members

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