ParoXsitiC Posted August 5, 2006 Share Posted August 5, 2006 (edited) **recognizing..I am using a proxy to submit a form. IE gives me this page:The page cannot be displayed The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. --------------------------------------------------------------------------------Please try the following:Click the Refresh button, or try again later.If you typed the page address in the Address bar, make sure that it is spelled correctly.To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP). See if your Internet connection settings are being detected. You can set Microsoft Windows to examine your network and automatically discover network connection settings (if your network administrator has enabled this setting). Click the Tools menu, and then click Internet Options. On the Connections tab, click LAN Settings. Select Automatically detect settings, and then click OK. Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed. If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0. Click the Back button to try another link. Cannot find server or DNS ErrorInternet ExplorerThe function returns with a timeout error, but the IE stops doing anything after 3-4 seconds. I am unaware if other functions in IE.au3 do this as well. Edited August 5, 2006 by ParoXsitiC Link to comment Share on other sites More sharing options...
ParoXsitiC Posted August 5, 2006 Author Share Posted August 5, 2006 (edited) _IENavigate and _IELoadWait functions both handle the error correctly. _IEFormSubmit ($o_Form, 0) _IELoadWait($o_IE)oÝ÷ تè +ªèºwS+"±¬·^®º+²)Ü{Mú "±ìZrÙr¶¬jg³Mú Z+Úºg§¶«z{VwhÁ»¶¬v¬p¢¹ºÚ"µÍÒQQÜTÝXZ] ÌÍÛ×ÑÜK BÌÍÛ×ÝÚ[ÝÈH ÌÍÛ×ÑÜKØÝ[Y[[Ú[ÝÂÒQSØYØZ] ÌÍÛ×ÝÚ[ÝÊ UPDATE: _IELoadWait will return once the page gets the error, but it returns with @Error set to 0 (meaning no error occured) the _IELoadWait function is not picking up that an error occured, when it did. Edited August 5, 2006 by ParoXsitiC Link to comment Share on other sites More sharing options...
DaleHohm Posted August 5, 2006 Share Posted August 5, 2006 _IENavigate and _IELoadWait functions both handle the error correctly. _IEFormSubmit ($o_Form, 0) _IELoadWait($o_IE)oÝ÷ تè +ªèºwS+"±¬·^®º+²)Ü{Mú "±ìZrÙr¶¬jg³Mú Z+Úºg§¶«z{VwhÁ»¶¬v¬p¢¹ºÚ"µÍÒQQÜTÝXZ] ÌÍÛ×ÑÜK BÌÍÛ×ÝÚ[ÝÈH ÌÍÛ×ÑÜKØÝ[Y[[Ú[ÝÂÒQSØYØZ] ÌÍÛ×ÝÚ[ÝÊ UPDATE: _IELoadWait will return once the page gets the error, but it returns with @Error set to 0 (meaning no error occured) the _IELoadWait function is not picking up that an error occured, when it did._IELoadWait does not know whether what you expected to happen on a page load was what happened or not... it simply waits for the browser to report that the page load operation is COMPLETE (readyState = 4). As far as it is concerned, a message that page cannot be displayed is just as valid as your family vacation photos. _IENavigate behaves the same way... $o_IE is exactly the same as $o_Form.document.parentWindowYou don't show how $o_IE was established, but if it was created with _IECreate, for example, it is NOT the same as $o_Form.document.parentwindow. If you use ObjName you'll see that $o_IE is a browser object and the other is a window object - they can be used interchangably in many functions, but not all. There is a challenge with _IEFormSubmit that has been discussed before. The trouble is that you pass a form object to _IEFormSubmit and from that we can get the document and the parent window, but security restrictions prevent us from determining the browser object from there. This can sometimes get us into a cross-site scripting security error that is not something we can recover from... I try to trap for that, but I have recently discovered that the test I am doing for it is too specific and the "Access is denied" error has more than one error number (I test for 169). I'll be releasing a new version soo that should be able to detect this. So, the workaround that you show is valid, but may not always insure that everything is loaded properly... there is nothing better that can be done baswed on my current understanding because of the cross-site issues I mentioned above. To verify if you are experiencing this Access Is Denied issue, you can define the undocumented variable $__IEAU3Debug = True and _IELoadWait will spit out information on COM errors it is trapping. Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
ParoXsitiC Posted August 5, 2006 Author Share Posted August 5, 2006 (edited) Thanks for the explanation. I put the debug variable to true but nothing is written to console about any errors from IEloadwait. Here is the complete script thus far. expandcollapse popup#include <IE.au3> #include <File.au3> $__IEAU3Debug = True $User = "&userId=227598" $BodyURL = "http://www.imvu.com/catalog/web_registration.php?action=register" Dim $Proxies _FileReadToArray("proxies.txt",$Proxies) For $P = 1 to $Proxies[0] RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", "") DllCall('WININET.DLL', 'long', 'InternetSetOption', 'int', 0, 'long', 39, 'str', 0, 'long', 0) Global $o_IE = _IECreate ("about:blank",0,1) TrayTip("Proxy started " & $Proxies[$P],"Attempting to register account",100) $Begin = TimerInit() $URL = $BodyURL & $User _IENavigate($o_IE,$URL) If @Error <> 0 Then QuickOutput("IMVU.txt", $Proxies[$P] & ": ERROR NAV " & @Error, 1) FinishIE() ContinueLoop EndIf RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings", "ProxyServer", "REG_SZ", $Proxies[0]) DllCall('WININET.DLL', 'long', 'InternetSetOption', 'int', 0, 'long', 39, 'str', 0, 'long', 0) $o_Form = _IEFormGetObjByName ($o_IE, "web_registration") $o_avatarname = _IEFormElementGetObjByName ($o_Form, "avatarname") $o_password = _IEFormElementGetObjByName ($o_Form, "password") $o_confirmation = _IEFormElementGetObjByName ($o_Form, "confirmation") $o_tagline = _IEFormElementGetObjByName ($o_Form, "tagline") $o_email_address = _IEFormElementGetObjByName ($o_Form, "email_address") $o_dob_month = _IEFormElementGetObjByName ($o_Form, "dob_month") ;select $o_dob_day = _IEFormElementGetObjByName ($o_Form, "dob_day") ;select $o_dob_year = _IEFormElementGetObjByName ($o_Form, "dob_year") ;select $o_country = _IEFormElementGetObjByName ($o_Form, "country") ;select $randName = GenerateRandom(10) _IEFormElementSetValue ($o_avatarname, $randName) _IEFormElementSetValue ($o_password, "default123") _IEFormElementSetValue ($o_confirmation, "default123") _IEFormElementSetValue ($o_tagline, "Heyyyy! I'll fill this out later :)") _IEFormElementSetValue ($o_email_address, "paroxsitic+" & $randName & "@gmail.com") _IEFormElementOptionselect ($o_dob_month, "June", 1, "byText") _IEFormElementOptionselect ($o_dob_day, "04", 1, "byText") _IEFormElementOptionselect ($o_dob_year, "1985", 1, "byText") _IEFormElementOptionselect ($o_country, "United States - Michigan", 1, "byText") $HTML = _IEBodyReadHTML ($o_IE) $Code = StringRegExp($HTML, "thecode"", '(.*?)', ""ENTRY_HUMANCHECK_ERROR", 3) If Not @extended Then QuickOutput("IMVU.txt", $Proxies[$P] & ": ERROR CODE " & @Error, 1) FinishIE() ContinueLoop EndIf $o_thecode = _IEFormElementGetObjByName ($o_Form, "thecode") _IEFormElementSetValue ($o_thecode, $Code[0]) _IEFormSubmit ($o_Form, 0) _IELoadWait($o_IE) If @Error <> 0 Then QuickOutput("IMVU.txt", $Proxies[$P] & ": ERROR SUBMIT " & @Error, 1) FinishIE() ContinueLoop EndIf QuickOutput("IMVU.txt", $Proxies[$P] & ": Success " & TimerDiff($Begin), 1) FinishIE() Next Func FinishIE() TrayTip("Proxy closed","Finished registering",10) $reg = RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Cookies") FileDelete($reg & "\*imvu*.txt") _IEQuit($o_IE) EndFunc Func QuickOutput($Filename, $Output, $Mode) Local $File = FileOpen($Filename, $Mode) FileWriteLine($File, $Output) FileClose($File) EndFunc Func GenerateRandom($Length) Local $Chars For $x = 1 to $Length If Random(1,2,1) = 1 Then $Chars &= Chr(Random(Asc("a"), Asc("z"), 1)) Else $Chars &= Random(1, 9, 1) EndIf Next Return $Chars EndFunc Here are some proxies to put in proxies.txt 193.227.17.30:8080 196.203.192.27:8080 125.209.59.130:8080 159.148.229.6:8080 200.105.199.156:80 148.235.86.114:8080 Edited August 5, 2006 by ParoXsitiC Link to comment Share on other sites More sharing options...
DaleHohm Posted August 5, 2006 Share Posted August 5, 2006 Hmmm... then I don't understand what problem you are having. Can you summarize what is going wrong in your view again please? Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
ParoXsitiC Posted August 6, 2006 Author Share Posted August 6, 2006 (edited) When using a bad connection proxy I get the page "The page cannot be displayedThe page you are looking for is currently unavailable"When I submit the form using _IEFormSubmit ($o_Form) it will just sit at the "page cannot be displayed" screen until it times out (long time).When I attempt to use _IEFormSubmit ($o_Form, 0) with a following _IELoadWait it will say return at the site of "page cannot be displayed" but it will return 0. _IELoadWait does not recognize the error that the page did not correctly load.Here is the lastest IE events after the requested page was not found:IE Status text changed to: DoneUncatched event: ProgressChangeUncatched event: ProgressChangeIE has finished a navigation operationIE Changed the value of the property: {265b75c0-4158-11d0-90f6-00c04fd497ea}IE Changed the value of the property: {265b75c1-4158-11d0-90f6-00c04fd497ea}IE Changed the value of the property: {118D6040-8494-11d2-BBFE-0060977B464C}IE Changed the value of the property: {04AED800-8494-11d2-BBFE-0060977B464C}IE Status text changed to: Opening page res://C:\WINDOWS\system32\shdoclc.dll/dnserror.htm...Uncatched event: DownloadBeginIE Changed the value of the property: {265b75c0-4158-11d0-90f6-00c04fd497ea}IE Changed the value of the property: {265b75c1-4158-11d0-90f6-00c04fd497ea}IE Changed the value of the property: {118D6040-8494-11d2-BBFE-0060977B464C}IE Changed the value of the property: {04AED800-8494-11d2-BBFE-0060977B464C}IE Changed the value of the property: {265b75c0-4158-11d0-90f6-00c04fd497ea}IE Changed the value of the property: {265b75c1-4158-11d0-90f6-00c04fd497ea}IE Changed the value of the property: {118D6040-8494-11d2-BBFE-0060977B464C}IE Changed the value of the property: {04AED800-8494-11d2-BBFE-0060977B464C}IE Changed the value of the property: {265b75c0-4158-11d0-90f6-00c04fd497ea}IE Changed the value of the property: {265b75c1-4158-11d0-90f6-00c04fd497ea}IE Changed the value of the property: {118D6040-8494-11d2-BBFE-0060977B464C}IE Changed the value of the property: {04AED800-8494-11d2-BBFE-0060977B464C}IE Status text changed to: Downloading from site: about:blankIE Status text changed to: IE Status text changed to: IE Status text changed to: IE has finished loading URL: http://www.imvu.com/catalog/web_registration.phpIE Status text changed to: DoneUncatched event: ProgressChangeIE has finished a navigation operationUncatched event: TitleChangeIE Status text changed to: InternetUncatched event: ProgressChangeUncatched event: CommandStateChangeNote: res://C:\WINDOWS\system32\shdoclc.dll/dnserror.htm is the error I get and http://www.imvu.com/catalog/web_registration.php is the page that holds the form. Edited August 6, 2006 by ParoXsitiC Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now