Sign in to follow this  
Followers 0
HeinMueck

InetGet and error codes

11 posts in this topic

Hi,

I was just looking for some hints how InetGet sets @error on errors. And I stumbled over this very old thing:

http://www.autoitscript.com/forum/index.php?showtopic=29708

Is this still the status quo or could the error codes be usefully documented by now?

See my actual problem:

AutoIt has two http related functions I use here,

HttpSetProxy ( mode [, "proxy:port" [, "username", "password"]] )

InetGet ( "URL" [,"filename" [, reload [, background]]] )

I'm in a network, where the proxy is figured out by a pac script and it works fine with HttpSetProxy. In some parts of the network I can use the proxy without authentication, in some I need to specify a username/password.

The problem is, that Autoit does not open the usual credentials dialog when IE hits a proxy that requieres authentication. So the InetGet just fails without a useful error code. If it would say "Hey, the proxy asks you to specify a username and password", I could ask that from the user, redo HttpSetProxy and try again.

But because I cannot figure that out, the only way would by to ask a username and password in any case, even if it is not needed or even does not fix the problem, as a failure of InetGet could also indicate that the target server is down.

So not a cool user experience :mellow:

I see that InetGet sets @error, but is there a way to figure out from these values that the proxy wants credentials? That would be the only case I would like to diff from all other problems.

Any way?

Cheers,

Hein

Share this post


Link to post
Share on other sites



I am also interested in this. My inetread does not work for a certain URL on a certain pcs and I have no idea why. It sets @error to 12, but WTH does it mean?

Could it be that URL is too long? Over 2000characters. But server can handle URLs like 8000characters AFAIK and there is no warning or error in /var/log/httpd/error_log, so it must be somehow blocked on a client side. Again different URLs are working on the same pc in the same program using inetread(), but this particular one does not.

Thank you

Share this post


Link to post
Share on other sites

bump...

Share this post


Link to post
Share on other sites

It works for me.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

well what is the reason you answer then? :) Me and HeinMuheck want to know what the @error codes from inetget mean. And I did not say it does not work at all for me. Just one particular URL does not. Sorry but did you read the posts at all? ;)

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Sorry but do you relise you resurrected a 3 1/2 year old thread and then proceeded to be impatient and bump it less than 24 hours?

I suggest you provide a reproducible example, that was my point.

Edit: Reason being

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

well what is the reason you answer then? Posted Image Me and HeinMuheck want to know what the @error codes from inetget mean. And I did not say it does not work at all for me. Just one particular URL does not. Sorry but did you read the posts at all? Posted Image

Have you searched for WinInet error codes on the internet?


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

Allright so I am sorry I wrote it yesterday and bumped it today. Did not exactly count hours and I apologize for that. But I don't see anything bad on replying to an old thread if the issue is still actual. I think it is better then creating a new post with the same question thus just creating mess in the search results.

JohnOne do you mean these? Unfortunatelly it does not seem to apply here because those codes start at number 12000. This is a real mystery... thank you anyway

EDIT:

Maybe there could be something in @extended yet. Will test...

EDIT2:

inetread @error:12 @extended:122 and an empty string as a result. Does not make me much more clever :-)

EDIT3: this is the URL. I have changed some strings in it because I don't feel like sharing everything with public

http://url/scriptdit/dbfce.php?&fce=setuserinfo&sn=FJDKFNC&userid=Z54651&profilesize=112.03&lastlogin_date=2012-05-08 8:38:16&profile_biggestitems=%0D%0Ac%3A%5CDocuments+and+Settings%5CZ54651+%285+biggest+items%29%0D%0A+++Application+Data+++++117%2E75MB%0D%0A+++Desktop+++++11%2E84MB%0D%0A+++Cognitas+++++3%2E9MB%0D%0A+++Transcripts+++++1%2E27MB%0D%0A+++Meetings+++++0%2E99MB%0D%0Ac%3A%5CDocuments+and+Settings%5CZ54651%5CApplication+Data%5C+%285+biggest+items%29%0D%0A+++Lotus+++++63%2E02MB%0D%0A+++Sun+++++29%2E93MB%0D%0A+++Mozilla+++++19%2E01MB%0D%0A+++Microsoft+++++4%2E59MB%0D%0A+++ICAClient+++++0%2E84MB%0D%0Ac%3A%5CDocuments+and+Settings%5CZ54651%5CDesktop%5C+%285+biggest+items%29%0D%0A+++g2a%5Fhelpalert%2Eexe+++++7%2E5MB%0D%0A+++PMO+bgvuwhbur%2Edoc+++++3%2E32MB%0D%0A+++BP%5FDatabase+%28version+1%29%2Exls+++++0%2E35MB%0D%0A+++updates+marked+with+yellow+Workload+done+28%2E03%2E2012%2Exls+++++0%2E23MB%0D%0A+++ole0%2Ebmp+++++0%2E07MB%0D%0Ac%3A%5CDocuments+and+Settings%5CZ54651%5CCognitas%5C+%285+biggest+items%29%0D%0A+++CrossLink6+++++2%2E32MB%0D%0A+++CrossLinkWE%2Eexe+++++0%2E78MB%0D%0A+++CrossLinkWE%2Ezip+++++0%2E38MB%0D%0A+++CLPrinterHelper%2Eexe+++++0%2E1MB%0D%0A+++csathl%2Edll+++++0%2E09MB&reducepossible=0&hash=57062277c1068f308e0a0ce6be059b5a64
Edited by LoWang

Share this post


Link to post
Share on other sites

As referenced in the OPs post, through the link to another post where Valik explains it, the error codes returned aren't a reference to anything that can be translated to "normal" error codes. They're only there for the developers, they are only shown to the users (us) because the developers wanted the users to know that the function failed, but there is nothing more to be gotten from the error codes other than it failed. At least that is how it was explained 6 years ago in the thread, I'm not sure if it's changed since then but I haven't been able to find anything in the change logs that show that it has changed.

1 person likes this

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

#11 ·  Posted

Well there is WinHTTP by trancexx & co in the Examples section.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

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  
Followers 0