Jump to content

Are there substitutes for InetGet?


Quinch
 Share

Recommended Posts

...because I'm having serious issues with using it, to the point of AutoIt actually crashing {as in not exiting via error, but an actual "this application has shat itself" crash}. I don't think I've had AutoIt ever crash, literally ever, so... yeah. I've dug through the example forum a bit, but without much luck.

library.au3

Edited by Quinch
Link to comment
Share on other sites

Quinch,

While we are a bit off topic, have you made progress toward the colliding MD5 issue?

This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Link to comment
Share on other sites

What is the errror when you run the script from SciTE? (console output)

Like I said, it doesn't exit with an error, it actually crashes. The crash info, if it interests you, is;

Problem signature:

Problem Event Name: APPCRASH

Application Name: AutoIt3.exe

Application Version: 3.3.6.1

Application Timestamp: 4bc81615

Fault Module Name: WININET.dll

Fault Module Version: 9.0.8112.16440

Fault Module Timestamp: 4eb3182c

Exception Code: c0000005

Exception Offset: 00027aab

OS Version: 6.1.7600.2.0.0.256.1

Locale ID: 1033

Additional Information 1: 0a9e

Additional Information 2: 0a9e372d3b4ad19135b953a78882e789

Additional Information 3: 0a9e

Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

Read our privacy statement online:

http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

If the online privacy statement is not available, please read our privacy statement offline:

C:\Windows\System32\en-USerofflps.txt

Quinch,

Do you have your DB schema in DDL format. Kinda hard to test without it.

Oh, derp. Can't upload the file, though.

CREATE TABLE threads (size NUMERIC, threadno NUMERIC, poster TEXT, time TEXT, title TEXT);

CREATE TABLE tb (template TEXT, filenames TEXT, MD5 TEXT, size NUMERIC);

CREATE TABLE unsorted (filename TEXT, url TEXT, line NUMBER);

Quinch,

While we are a bit off topic, have you made progress toward the colliding MD5 issue?

Not really, I couldn't reproduce it, but I subsequently decided to have the script check for both filesize and MD5 just to be on the safe side anyway. Edited by Quinch
Link to comment
Share on other sites

Quinch,

I'm sure you know this but you are running a backleveled version of autoIT. There were some changes to inetget. I found / tested a background loader by tvern that you may be interested in. It downloaded 100 .png files simultaneously on my slow ass connection with no problems. The following is the code (I forgot to save the link)

Local $aDownloads[100]
;~ _MaxConnections(20) ;uncomment to set the max open connections to one server to 20
_BackgroundMethod($aDownloads)
_StandardMethod($aDownloads)
Exit

Func _BackgroundMethod($downloads)
    Local $complete, $timer
    DirRemove(@ScriptDir & "filesbackground",1)
    DirCreate(@ScriptDir & "filesbackground")
    $timer = TimerInit()
    For $i = 0 To UBound($downloads)-1
        $downloads[$i] = InetGet("http://www.google.com/intl/en_com/images/srpr/logo1w.png",@ScriptDir & "filesbackgroundfile" & $i & ".png",1,1)
    Next
    Do
        For $i = 0 To UBound($downloads)-1
            If InetGetInfo($downloads[$i],2) Then
                ;you could start performing functions on the completed file already by making a function call here.
                $downloads[$i] = False
                $complete += 1
            EndIf
        Next
    Until $complete = UBound($downloads)
    ConsoleWrite("The background method finished in " & TimerDiff($timer) & "ms."& @CRLF)
EndFunc

Func _StandardMethod($downloads)
    Local $timer
    DirRemove(@ScriptDir & "filesstandard",1)
    DirCreate(@ScriptDir & "filesstandard")
    $timer = TimerInit()
    For $i = 0 To UBound($downloads)-1
        InetGet("http://www.google.com/intl/en_com/images/srpr/logo1w.png",@ScriptDir & "filesstandardfile" & $i & ".png",1,0)
    Next
    ConsoleWrite("Standard method finished in " & TimerDiff($timer) & "ms."& @CRLF)
EndFunc

Func _MaxConnections($max)
    RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings","MaxConnectionsPer1_0Server","REG_DWORD","0x" & Hex($max,8))
    RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionInternet Settings","MaxConnectionsPerServer","REG_DWORD","0x" & Hex($max,8))
EndFunc

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

Hundreds isn't a problem - I can do that without inet handle management. Tens of thousands seems to break it, though.

Either way, I've been digging around a bit and I think I might be able to use the bitsadmin command line tool instead. It won't be elegant, but whatever works, right?

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