Sign in to follow this  
Followers 0
Herb191

InetGet Question

7 posts in this topic

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?

Thanks!

Share this post


Link to post
Share on other sites



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

8)


NEWHeader1.png

Share this post


Link to post
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

8)

Share this post


Link to post
Share on other sites

Anyone? Ive read all the help files I could find as well as searching old posts. I have been working on this all day with out any luck. Any help would be greatly appreciated.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

you might want to post the URL link so that other can work with it...

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
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)

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

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)
Next

Func _GetIt($IBSNNumber)
    Do
        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

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
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
Sign in to follow this  
Followers 0