Jump to content

_INetGetSource @extended returning different bytes


Recommended Posts

Hello!

 

I was playing around with _INetGetSource(), and just seeing how it returned the bytes. It doesn't seem to return what I would expect, though. For example, I loaded up http://asdf.com/aboutasdf.html, and viewed the page source. Copy/ pasted that into a Notepad++ document, and I get a length of 2,481 characters > 2,481 bytes. When I do:

#include-once
#include <Inet.au3>

Global $sSource, $sSite = "http://asdf.com/aboutasdf.html"
Global $iBytes

$sSource = _INetGetSource($sSite) ;Get the page source for the account
If Not @error Then ;As long as nothing goes wrong
    $iBytes += @extended ;Get number of bytes returned
    MsgBox(0, '', $iBytes & @CRLF & $sSource) ;Number of bytes, and the source
    ClipPut($sSource)
    Exit
EndIf

I get a return of 2,391 bytes (missing 90 bytes) from the @extended when I run _INetGetSource(). If I put the page source into my clipboard and paste that into the Notepad++ document, I still get 2,479 (it removed the top blank line that I get when selecting all from the page source in my browser). So the source that I copy from my browser, and that AutoIt puts in my clipboard is ~2,480 bytes. So, why is the @extended returning 2,391? Maybe I'm just missing something.

On just http://asdf.com/ it returns 1,892, which I get when copy/pasting as well, from the script and from the browser.

 

Thanks,

We ought not to misbehave, but we should look as though we could.

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

×
×
  • Create New...