Jump to content

Recommended Posts

Posted

InetGet("http://www.mozilla.org", "C:\foo.html")
InetGet("http://www.autoitscript.com", "C:\mydownload.htm", 1)
InetGet("ftp://ftp.mozilla.org/pub/mozilla.org/README", "README.txt", 1)
; Advanced example - downloading in the background
;InetGet("http://www.nowhere.com/somelargefile.exe", "test.exe", 1, 1)

While @InetGetActive
  TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
  Sleep(250)
Wend

MsgBox(0, "Bytes read", @InetGetBytesRead)

this is the help file, it does not work on my machine, yes i am online.

im using the latest production and beta

whats up?

Posted

The one that runs in the background is commented out, so the While loop is never true and doesn't run.

:)

yeah, i know that but the three above dont run either
Posted

yeah, i know that but the three above dont run either

This worked for me:

InetGet("http://www.autoitscript.com/autoit3/files/beta/autoit/autoit-v3.2.9.1-beta-setup.exe", "C:\Temp\AIBeta.exe", 1, 1)

While @InetGetActive
    ToolTip("Downloading Bytes = " & @InetGetBytesRead)
    Sleep(250)
    ToolTip("")
WEnd

MsgBox(0, "Bytes read", @InetGetBytesRead)

Bigger file, and ToolTips update better than TrayTips for me.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

all i get whenever I try a Inetget is a return of -1, which is a failure.

I can stick the URL in firefox and the file displays fine.

why would firefox be able to access the file but not Inetget?

Posted

all i get whenever I try a Inetget is a return of -1, which is a failure.

I can stick the URL in firefox and the file displays fine.

why would firefox be able to access the file but not Inetget?

Firefox may have proxy/network configs that you don't have setup for InetGet.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

Firefox may have proxy/network configs that you don't have setup for InetGet.

:)

naa, nothing special. no proxy in use.

it HAS to be something with my machines config however, if it works for everyone else.

thanks for the effort, Im stumped.

i have 3 network interfaces, ethernet, wifi, and hamachi

Do i need to define which interface to use anywhere?

Posted

Inetgetsize works!, this is crazy

I'm visiting the forum for the same reason. I find that InetGet fails, but only on some AutoItScript.com pages (others work normally). Try the test script below. The first two pages return zero, the next two return 1.

CODE
;; InetGet not working on some AutoIt web pages:

$i1 = InetGet("http://www.autoitscript.com", @TempDir & "\junk-test1.txt", 1, 0)

$i2 = InetGet("http://www.autoitscript.com/autoit3/downloads.shtml", @TempDir & "\junk-test2.txt", 1, 0)

$i3 = InetGet("http://www.autoitscript.com/autoit3/files/beta/autoit/", @TempDir & "\junk-test3.txt", 1, 0)

$i4 = InetGet("http://www.mozilla.org", @TempDir & "\foo.html")

MsgBox(4096, "InetGet Results", _

"InetGet Results (0 means InetGet failed)" &@LF&@LF& _

"$i1 = " & $i1 & " for http://www.autoitscript.com, " &@LF&@LF& _

"$i2 = " & $i2 & " for http://www.autoitscript.com/autoit3/downloads.shtml" &@LF&@LF& _

"$i3 = " & $i3 & " for http://www.autoitscript.com/autoit3/files/beta/autoit/" &@LF&@LF& _

"$i4 = " & $i4 & " for http://www.mozilla.org" _

)

Exit

Phillip

Posted

Could you all report the version number of AutoIt you are using?

I have tested the script posted by @phillip123adams and can verify that it seems to have problems with the two first entries.

If the script is changed to use _InetGetSource it seems to work as expected.

I have tested with Autoit-v3.2.3.0.

Posted

Could you all report the version number of AutoIt you are using?

I ran the test under v3.2.8.1.

I don't know which, but not too many versions ago, InetGet did work on all AutoItScript sites. If needed, I could install some older versions to see when it quit working.

Phillip

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
×
×
  • Create New...