Jump to content
Sign in to follow this  
eHrgo

[InetGet] - Always @error. was working!

Recommended Posts

Curl?

I can't find anything about that.

Not working with every ineget things .. inetgetsize _inegetsource .... @error.

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

I'm curious on the "not" working issue.

1. Is this a secured site that requires credentials to download something?

2. What autoit version are you using?

3. If you give this a try, what do you get:

$hDLL = DLLOpen(@SystemDir & '\wininet.dll')
If IsArray($hDLL) = 0 Then
    MsgBox(16, 'Error', "Dll didn't open")
    Exit
EndIf
InetGet('URL/FileToGet.Extension', 'PathToDownloadTo')
DLLClose($hDLL)
Use the above by itself and not in whatever script you are writing and see if the results change.

Edit:

Had to fix quote issue.

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Thank you.

1- This site has Premium paid account, which giving you acess to a zone...

The file I'm trying to download is the Login Page [or the page] of the Premium Zone.

If you are not logged in, it returns the login page, if you are, it returns the Premium zone page.

Whatever it is I want to get the source code of this page.

2-Using release 3.2.2.0 of autoit [beta]

3- With this script, I get the MsgBox: Dll didn't open

I'm working on vista, and the wininet.dll file is effectively in @SystemDir. I checked.

Posted Image

Thanks for you help, I can't get the file for 2 days now... :whistle:

Edit:/ Im trying to understand Curl.

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

if you cant load wininet.dll then this should give you an @error

$a = DllCall("wininet.dll","int","InternetAttemptConnect","int",0)
If @error Then
    MsgBox(0,"@error",@error)
Else
    MsgBox(0,"Result",$a[0])
EndIf

run it an tell us which one...

btw.

did you try _INetGetSource() ?


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

It returns me The second MsgBox, so $a[0] equal 0:

Posted Image

I tried InegetGetSource, it returns me @error.

Weird?

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

A great 0.

Thanks a lot for you time and you help.

Edit:/ I have sometime 12057 ! I got it twice on 5 try.

Edit²:/ Im now hardly ever getting 0 .. almost always 12057.

Edit²':/ If I add a Sleep (1000) betweend the Ineget and the DllCall i always got 0.

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

does $sTmp contain the source of the page when GetLastError is 0 ?

ERROR_INTERNET_SEC_CERT_REV_FAILED (12057) doesent tell me much (but maybe someone else)

something about ssl...

the other pc you used does it have the same os & autoit version?


CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post


Link to post
Share on other sites

$sTmp return me a blank one ... Nothing in it... But:

Posted Image

Return Value

Success: Returns the source code.

Failure: 0 and sets @ERROR = 1

How can it be possible??

The other computer I used doesn't have Autoit [Compiled version] working with XP [Tried 2 different, on a different place], not Vista.

Thanks

Edit:/ It returns me the source code with another url, and a 6.

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

This is Vista you are working with?


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Yep.

It was working great few days ago, and it stopped working, worked again, now it's stuck with that error.

No Os Change, didn't even reboot.

InetGet ( 'https://ssl.rapidshare.com/cgi-bin/collectorszone.cgi', 'text.txt' )

        If @error Then
            MsgBox (0, '', 'failed')
        Else
            MsgBox (0, '', 'suceed')
        Endif

Like I Said, i tried the above script on 2 differents computer:

-Same Network, same internet connection, Xp ->Worked

-A friend's one, Xp ->Worked

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

Sounds like a permissions issue to me... you might not have rebooted, but that doesn't mean you didn't change anything. And you obviously did (or the OS did) or it would still be working if you hadn't changed your script at all.

I think you are looking at the wrong issue as I said before, I don't believe it's an AutoIt issue per-say.


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

I tried to run as admin .. not working.

Yep, I don't think so ... but I don't really know where does the error come from .. so I try.

I'm stuck! And I'm not able to know why. :P

Was a great one, I'm fcked up..

Thanks for your help. :whistle:

Edited by eHrgo

Sorry for my Bad English.

Share this post


Link to post
Share on other sites

Yes its working...

Maybe I found, I updated my vista one day before my first problem.... Maybe the reinforced the security, this page is secured.. Maybe we can't download secured page anymore?

Im gonna try with another secured page.

Thanks


Sorry for my Bad English.

Share this post


Link to post
Share on other sites

HUm, can I ask you just a simple last question?

How can I use another Function to get the Source of my page? [Not an Inetget func] Something simple, Curl looks difficult to me.


Sorry for my Bad English.

Share this post


Link to post
Share on other sites

HUm, can I ask you just a simple last question?

How can I use another Function to get the Source of my page? [Not an Inetget func] Something simple, Curl looks difficult to me.

I'm sure there are some _IE.au3 functions that will do this.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

Hum sorry, working but still have a problem, its asking me everytime the page refresh If i want to display the secured item ...

I can't use the IE fucs because of that:

Posted Image

How can I solve it? another function? Hide this message? Thanks


Sorry for my Bad English.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...