Sign in to follow this  
Followers 0
snaileater

[solved] Dumb question about InetGetInfo

9 posts in this topic

#1 ·  Posted (edited)

Hi all,

i make my first tries with inetgetinfo. i had a look into the InetGetInfo.au3 example which is working fine. i made then a change turning the "in-the background" download into a "not in the background" download.

In that case i always get an error with that function saying the data returned is not an array (as described in the documentation)

Do i forget anything ?

thanks !

Edited by snaileater

Share this post


Link to post
Share on other sites



Hi all,

i make my first tries with inetgetinfo. i had a look into the InetGetInfo.au3 example which is working fine. i made then a change turning the "in-the background" download into a "not in the background" download.

In that case i always get an error with that function saying the data returned is not an array (as described in the documentation)

Do i forget anything ?

thanks !

Can you show your script ?

It will be more easy to resolve your problem Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

Here is what i did ... :

Local $hDownload =InetGet("http://www.rtbf.be/classic21/","toto.dat",1,0)
$aData = InetGetInfo($hDownload)
If @error Then
    MsgBox(4096,"Classic 21...", "Error...")
Else
    MsgBox(4096,"Classic 21...", "Ok...")
EndIf
InetClose($hDownload)
If IsArray($aData) Then
    MsgBox(0, "Classic 21...", "Array...")
Else
    MsgBox(0, "Classic 21...", "Not an array...")
EndIf
MsgBox(32,"Classic 21...",$aData)

Share this post


Link to post
Share on other sites

The helpfile explains that, in wait mode (non-background), the return value is the number of bytes downloaded. The handle is only returned in background mode.

(I must admit that I had to read the page a few times before I understood what it said.)

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

hum ?

I don't see that in the help file i have here (offline version) which i downloaded a few days ago ...

Thanks

Edited by snaileater

Share this post


Link to post
Share on other sites

You need new glasses then.

Success: The return value changes depending on if the download is in the background:

Background: A handle is returned. The handle can be used with InetGetInfo(). The handle must be closed with InetClose().

Wait: The number of bytes downloaded.

Also what are you meaning with offline version? Just use the helpfile you get when you install AutoIt.

Share this post


Link to post
Share on other sites

You need new glasses then.

Also what are you meaning with offline version? Just use the helpfile you get when you install AutoIt.

That's the one i use ... i just meant "not the on-line version" ... :)

The topic can be closed ... next time i should have a deeper look in the doc (i just didn' read the inetget info "Alex") ...

At least my topic title was right ... it was a dumb question ... ;)

is there a way to tag the topic as "closed" ?

thanks guys !

Share this post


Link to post
Share on other sites

Like I said: I thinkt that, while the information in the helpfile is correct, it is a little confusing to read.

I like the way the return values for different StringRegExp modes are expained are better.

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