Jump to content
Sign in to follow this  
kraZcoda

_INetGetSource Is No Longer Working For Me

Recommended Posts

kraZcoda

This used to work for me, but now it doesn't...

#include <Inet.au3>
MsgBox (0, "", _INetGetSource('www.autoitscript.com'))

It just results in a blank MsgBox.

_INetGetSource was working fine for me until about a week ago. Now it's not working for me and a number of users of a script I wrote.

My internet connection works fine, i.e. I'm able to access autoitscript.com and post this topic.

Could it be related to my operating system? I'm running WinXP SP3. My c:\windows\system32\wininet.dll version is 7.0.6000.16827. Also my AutoIt version is 3.2.12.1. Possibly a related problem is that my AutoIt Check For Updates does not work. Gets an error: Error connecting to server.

It works if I navigate to the page. This works...

#include <IE.au3> 
$oIE = _IECreate('www.autoitscript.com', 0, 0)
MsgBox (0, "", _IEDocReadHTML ($oIE))
$oIE = 0

Any idea what could cause this problem?

Share this post


Link to post
Share on other sites
Inverted

Maybe it has to do with the version of Internet Explorer you have, try updating it. You could try the latest AutoIt beta, which has rewritten InetGet, you'll need to read the new documentation though.

Edited by Inverted

Share this post


Link to post
Share on other sites
kraZcoda

I've been avoiding updating to IE8 because I've heard from some people that it has slowed down their computer. Also, I'm not eager to update my AutoIt version, because the last time I did it broke my script (I did it without reading the documentation).

I really need it to work on multiple Internet Explorer versions, so that it works for other people no matter what version they have loaded.

Any other possibilities?

Edited by kraZcoda

Share this post


Link to post
Share on other sites
herewasplato

#include <Inet.au3>
MsgBox (0, "", _INetGetSource('www.autoitscript.com'))
Works for me with IE6 or IE8 on XP Pro SP3. I don't have IE7 right now.

Edit: AutoIt v3.3.0.0 for all tests

Edit2: works with IE7 when the wininet.dll version is 7.0.5730.13

Edit3: works with IE7 when the wininet.dll version is 7.0.6000.16850

Edit4: installed AutoIt v3.2.12.1 and it works fine

wininet.dll version is still at 7.0.6000.16850

I do not know where to get 7.0.6000.16827.

You must be between patches on IE7.

Edited by herewasplato

[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
kraZcoda

I have IE7 Version 7.0.5730.13 Cipher Strength 128-bit

I went to update.microsoft.com and installed all of the updates except I did not install IE8.

My wininet.dll version after doing the updates is now 7.0.6000.16850 and my IE7 version is still the same.

#include <Inet.au3>
MsgBox (0, "", _INetGetSource('www.autoitscript.com'))

This still gives me a blank MsgBox.

Share this post


Link to post
Share on other sites
herewasplato

Try...

#include <Inet.au3>
$var = _INetGetSource('www.autoitscript.com')
MsgBox(0, "@error", @AutoItVersion & @CR & @error)
MsgBox(0, "$var", $var)
...and see what @error is set to.

Success:

Returns the source code.

Failure:

0 and sets @ERROR = 1

Please post a screen shot of each MsgBox return.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
lordicast

Maybe this will help. Are you currently at work? If so my job blocks external browser atempts so Net.AU3 doesnt work. However IE.AU3 functions do. hope it helps.


[Cheeky]Comment[/Cheeky]

Share this post


Link to post
Share on other sites
kraZcoda

Here are my results...

Posted Image

Posted Image

Are you currently at work?

I'm not at work. I'm using Comcast internet.

Share this post


Link to post
Share on other sites
herewasplato

Thanks for the pics...

This is probably on your desktop computer so taking it to another location and ISP is probably not easy. How about land line or cell phone dial up to another ISP?

NetZero still offers 10hr/mo of free dial up.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
trancexx

I would say it's a firewall issue.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
Inverted

Yeah, probably the main autoit exe is blocked. Try compiling an executable and running that.

And updating to IE8 is a good thing ! :)

Share this post


Link to post
Share on other sites
kraZcoda

I got the same result after I disabled my firewall software...

Posted Image

And I got the same result using a compiled version of the script.

I'll try connecting to the internet via a different network and see if that helps, however I don't expect it will because there are other people that are having similar results and it's unlikely we're all using the same ISP.

Share this post


Link to post
Share on other sites
Inverted

In lack of a better suggestion, I advise to update IE to 8 or update AutoIt to the latest stable ... 3.3.0.0

Edited by Inverted

Share this post


Link to post
Share on other sites
herewasplato

In lack of a better suggestion, I advise to update IE to 8 or update AutoIt to the latest stable ... 3.3.0.0

OP might have trouble convincing everyone to go to IE8:

... it's not working for me and a number of users of a script I wrote.

But I guess it could be a condition for using the script.


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
trancexx

I don't see updating IE to v8 as a solution. I mean, what was that derived out? Reinstalling current ok, but new? Even if it would work it would also give few more questions when you think of it.

@kraZcoda, are you completely (and with no doubt) sure that you don't have third party firewall installed.

Even some stupid AV could block that. Your picture shows that you don't have either in use, but still, do check and double check again.

herewasplato could also be right about ISP regardless of your believes.

Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
herewasplato

All sorts of weird things can happen... like automatic update of router firmware. Verizon was forcing updates until they barfed one that sent many a router into a reboot loop. :-(

You might not have firewall sw on the computer - but do you have something at the router level? Has it changed recently?

It might seem odd to keep poking at localized issues when you know that the problem happens for others, but you have tons of users for whom this function works as expected. If there were some OS patch that broke it, then the forum would have many posts about it.

How widespread (geographically) are these users of yours that have the same problem? Same city/state?


[size="1"][font="Arial"].[u].[/u][/font][/size]

Share this post


Link to post
Share on other sites
kraZcoda

I drove around my neighborhood and found 3 WiFis. I got the same results when connected to those. Just to be sure I also tested on a public WiFi and got the same results. So ISP or router does not seem to be the problem.

I've double checked and I don't see any firewall or virus scan software loaded on my computer.

I don't know the locations of all the people that are having the same problem with my script, but I know at least one user is in a different state and using a different ISP.

Does anyone know of any other uses of the wininet.dll that can be tested to see if anything related to this dll is working? Or any other ideas?

Edited by kraZcoda

Share this post


Link to post
Share on other sites
kraZcoda

Eureka! I got it to work, but I still haven't totally figured it out.

As a test, I rebooted into Safe Mode with Networking (press F8 before Windows starts to load). Although I normally only have one user that I can login as, in safe mode I also had the option to login as Administrator. When I logged in as Administrator, the script worked. When I logged in under the user account (still in Save Mode), the script did not work.

So is it a permissions problem?

Well here's the thing... When I go to User Accounts in Control Panel, my user account is setup as "Computer Administrator". So why do I get a different result when I login under the Administrator account?

When I login to my user account in Normal mode (not Safe Mode) I don't see any permissions settings for wininet.dll. However, when I login as Administrator in Safe Mode, I'm able to see the permissions (security) settings for the file.

Any idea what changes I need to make to get the script to run under my user account?

Share this post


Link to post
Share on other sites
kraZcoda

I still haven't figured this one out. Any suggestions?

Share this post


Link to post
Share on other sites
DCCD

Check out the following,

DL wininet.dll (wininet) 6.00.2900.2904

http://code.google.com/p/s-code/downloads/detail?name=wininet.dll

MsgBox(0, "", _GetSource("www.autoitscript.com"))

Func _GetSource($s_URL, $s_Header = '')

    If StringLeft($s_URL, 7) <> 'http://' And StringLeft($s_URL, 8) <> 'https://' Then $s_URL = 'http://' & $s_URL

    Local $h_DLL = DllOpen(@ScriptDir & "\wininet.dll")

    Local $ai_IRF, $s_Buf = ''

    Local $ai_IO = DllCall($h_DLL, 'int', 'InternetOpen', 'str', "AutoIt v3", 'int', 0, 'int', 0, 'int', 0, 'int', 0)
    If @error Or $ai_IO[0] = 0 Then
        DllClose($h_DLL)
        SetError(1)
        Return ""
    EndIf

    Local $ai_IOU = DllCall($h_DLL, 'int', 'InternetOpenUrl', 'int', $ai_IO[0], 'str', $s_URL, 'str', $s_Header, 'int', StringLen($s_Header), 'int', 0x80000000, 'int', 0)
    If @error Or $ai_IOU[0] = 0 Then
        DllCall($h_DLL, 'int', 'InternetCloseHandle', 'int', $ai_IO[0])
        DllClose($h_DLL)
        SetError(1)
        Return ""
    EndIf

    Local $v_Struct = DllStructCreate('udword')
    DllStructSetData($v_Struct, 1, 1)

    While DllStructGetData($v_Struct, 1) <> 0
        $ai_IRF = DllCall($h_DLL, 'int', 'InternetReadFile', 'int', $ai_IOU[0], 'str', '', 'int', 256, 'ptr', DllStructGetPtr($v_Struct))
        $s_Buf &= StringLeft($ai_IRF[2], DllStructGetData($v_Struct, 1))
    WEnd

    DllCall($h_DLL, 'int', 'InternetCloseHandle', 'int', $ai_IOU[0])
    DllCall($h_DLL, 'int', 'InternetCloseHandle', 'int', $ai_IO[0])
    DllClose($h_DLL)
    Return $s_Buf
EndFunc   ;==>_uu
Edited by DCCD

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.