mattfaust Posted September 27, 2007 Share Posted September 27, 2007 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? Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 27, 2007 Share Posted September 27, 2007 The one that runs in the background is commented out, so the While loop is never true and doesn't run. 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 Link to comment Share on other sites More sharing options...
mattfaust Posted September 27, 2007 Author Share Posted September 27, 2007 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 Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 27, 2007 Share Posted September 27, 2007 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 Link to comment Share on other sites More sharing options...
mattfaust Posted September 28, 2007 Author Share Posted September 28, 2007 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? Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 28, 2007 Share Posted September 28, 2007 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 Link to comment Share on other sites More sharing options...
mattfaust Posted September 28, 2007 Author Share Posted September 28, 2007 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 hamachiDo i need to define which interface to use anywhere? Link to comment Share on other sites More sharing options...
weaponx Posted September 28, 2007 Share Posted September 28, 2007 How about trying InetGetSize or Ping and see what @error is returned. Link to comment Share on other sites More sharing options...
mattfaust Posted September 28, 2007 Author Share Posted September 28, 2007 How about trying InetGetSize or Ping and see what @error is returned.Inetgetsize works!, this is crazy Link to comment Share on other sites More sharing options...
phillip123adams Posted September 30, 2007 Share Posted September 30, 2007 Inetgetsize works!, this is crazyI'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 Link to comment Share on other sites More sharing options...
Uten Posted September 30, 2007 Share Posted September 30, 2007 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. Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
phillip123adams Posted September 30, 2007 Share Posted September 30, 2007 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 Link to comment Share on other sites More sharing options...
phillip123adams Posted October 4, 2007 Share Posted October 4, 2007 This issue has been resolved. InetGet is working again on the AutoIt pages. It appears to have been a problem with the AutoIt web pages themselves as I'm still using version 3.2.8.1 and I can get the pages that failed earlier. More at http://www.autoitscript.com/forum/index.ph...&hl=Inetget Phillip Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now