Jump to content

[solved] Dumb question about InetGetInfo


Recommended Posts

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

Link to comment
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)
Link to comment
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.)

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

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

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...