LovinItAll Posted February 21, 2006 Share Posted February 21, 2006 (edited) I've written a nifty little script and have 7 users testing it. The script works flawlessly for 6 of the users (BTW--the users are not local). The 7th user gets this error: "The requested action with this object has failed" I'll set up the scenario: - the script creates a GUI - user completes some fields - user clicks "Start" and the script opens an IE window using _IECreate() The thing is, the user will get the error randomly. Sometimes the error will occur as soon as she starts my script, other times it will be when she clicks "Start", other times it will be in the middle of the process that runs once the program is doing its' thing. None of the other users are having this problem, and they have used the script FAR more than the user with the problem. I cannot replicate the error, and I have run the script at least a thousand times. She gets the error EVERY TIME she runs the script. Of the things I have checked, these things are common amongst all of the users: - Windows XP SP2 - IE v6 (though sometimes she gets the error before I call IE) The only thing that is different is that she is running an AMD processor. My other testers are running Pentiums. Any ideas? Edited February 21, 2006 by LovinItAll Link to comment Share on other sites More sharing options...
Nuffilein805 Posted February 21, 2006 Share Posted February 21, 2006 could you post your script? when i'm at home i can give it a try (AMD) helping is easier as well if you post it my little chatmy little encryption toolmy little hidermy unsafe clickbot Link to comment Share on other sites More sharing options...
LovinItAll Posted February 21, 2006 Author Share Posted February 21, 2006 Unfortunately, it won't do any good to post the entire script. It requires a certain type of account at an existing web site, and within that account the user must have existing customers. I will try to find a site that will accept similar input and modify the script for testing on your AMD. Than you very much for offering. I will get on it right away. could you post your script?when i'm at home i can give it a try (AMD)helping is easier as well if you post it Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 21, 2006 Moderators Share Posted February 21, 2006 I'm running an AMD here at work so if you post your script I'll test it. Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted February 21, 2006 Moderators Share Posted February 21, 2006 Unfortunately, it won't do any good to post the entire script. It requires a certain type of account at an existing web site, and within that account the user must have existing customers. I will try to find a site that will accept similar input and modify the script for testing on your AMD. Than you very much for offering. I will get on it right away.I wouldn't modify it at all! That would defeat the whole reason behind testing it. The script should still run even if we don't have an account. If it sometimes errors as soon as you start it, then we should still be able to test. Link to comment Share on other sites More sharing options...
DaleHohm Posted February 21, 2006 Share Posted February 21, 2006 (edited) A similar issue has been reported a few tines before, but no one has ever been able to help reproduce or narrow down the the cause. I have had a few suspicions, but have never been able to substantiate them. If this is occurring regularly you may be able to help get to the bottom of it. My strongest suspicion is a timing issue involving the initial instantiation of the browser window. The first thing to try is to edit the script and right after the $oIE = _IECreate()add _IELoadWait($oIE) The next step if this does not fix it will be to make some small mods to the the loadwait routine. Dale Edit: typos Edited February 21, 2006 by DaleHohm 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...
LovinItAll Posted February 21, 2006 Author Share Posted February 21, 2006 Here is the GUI. The user sometimes (but not always) gets the error as soon as she clicks on the .exe. Compile using Beta Compile for testing. expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> ;---Sets various options opt("WinWaitDelay", 100) opt("WinTitleMatchMode", 4) opt("WinDetectHiddenText", 1) opt("MouseCoordMode", 0) opt("SendKeyDelay", 1) ;HotKeySet("^!x", "Exit") ;---Set Exit method ;---Declare and assign version Dim $Version = "Ver 1.0 Beta" ;---Declare and assign License variable Dim $License = "Unassigned" ;----Declare variable for test mode Dim $Test = "F" ;----Declare variables for user input in GUI Dim $Subject Dim $Body Dim $Password Dim $Exit Dim $SendMailButton Dim $TestMailButton Dim $SubjectInput dim $MailInput Dim $o_IE ;---The IE Window object we are operating within ;MainScreen() ;==========Begin Main GUI======================== ;Func MainScreen() $MailHandler = GUICreate("Mail Handler- " & $Version & " - Licensed to: " & $License & " - MAY NOT BE DISTRIBUTED IN ANY WAY! ", 1016, 734, 193, 115) GUICtrlCreateLabel("Complete the fields below. All Fields Are REQUIRED!", 120, 8, 253, 17) GUICtrlCreateLabel("Subject:", 23, 123, 43, 17) $SubjectInput = GUICtrlCreateInput("", 80, 120, 409, 21, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlCreateLabel("", 576, 176, 4, 4) $MailInput = GUICtrlCreateEdit("", 80, 152, 409, 512, $ES_NOHIDESEL, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlSetData($MailInput, "") GUICtrlCreateLabel("________________________________________________________________________________", 8, 58, 484, 17) GUICtrlCreateLabel("NOTE: You may use any valid HTML code in the body of the mail to be sent.", 8, 80, 484, 17) GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Mail Body:", 14, 154, 53, 17) $TestMailButton = GUICtrlCreateButton("Test Mode", 35, 679, 128, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) $SendMailButton = GUICtrlCreateButton("Send Mail", 200, 679, 129, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") $Exit = GUICtrlCreateButton("Exit", 374, 679, 129, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlCreateLabel("", 704, 48, 4, 4) $Instructions = GUICtrlCreateLabel("", 536, 16, 441, 273, BitOR($ES_READONLY, $WS_BORDER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlSetData($Instructions, "A bunch of user instructions") GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) GUISetState(@SW_SHOW) ;EndFunc ;========================================End Main GUI ;-------Start interface and wait for input While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ;---User clicks the X to close the window ExitLoop Case $msg = $Exit ;---User clicks the Exit Button ExitLoop Case $msg = $SendMailButton;----User clicks the Send Mail button ;Main() Exit Case $msg = $TestMailButton;----User clicks the Test Mail button $Test = "T" ;Main() EndSelect WEnd Exit Link to comment Share on other sites More sharing options...
LovinItAll Posted February 21, 2006 Author Share Posted February 21, 2006 (edited) Dale, I have implemented _IELoadWait() functions througout the script, as I thought this might be a problem with the script executing before $oIE had a chance to fully load. The fact that the user gets the error as soon as she clicks the .exe is what is baffling. I have even put the basic sleep(5000) to make SURE the page has loaded before attempting to grab elements within the object. Doesn't seem to matter. All of the other users report zero problems, and I cannot get my script to crash under any circumstances. I thought maybe there was a possibility that an IE setup option was causing the prob, but that still does not explain the error she gets before _IECreate is even called! A similar issue has been reported a few tines before, but no one has ever been able to help reproduce or narrow down the the cause. I have had a few suspicions, but have never been able to substantiate them. If this is occurring regularly you may be able to help get to the bottom of it. My strongest suspicion is a timing issue involving the initial instantiation of the browser window. The first thing to try is to edit the script and right after the $oIE = _IECreate()add _IELoadWait($oIE) The next step if this does not fix it will be to make some small mods to the the loadwait routine. Dale Edit: typos Edited February 21, 2006 by LovinItAll Link to comment Share on other sites More sharing options...
LovinItAll Posted February 21, 2006 Author Share Posted February 21, 2006 Dale,I also read your post on trapping these errors, though I am not entirely clear on this:a UDF provider must carefully manage removal of a user handler, activation of a custom handler, removal of the custom handler and reinstatement of the user handler whenever the UDF requires it.In my case, I would have to poll for the error throughout the script. I'm working on it Link to comment Share on other sites More sharing options...
DaleHohm Posted February 21, 2006 Share Posted February 21, 2006 Dale,I also read your post on trapping these errors, though I am not entirely clear on this:In my case, I would have to poll for the error throughout the script. I'm working on it The comments about removing and installing a custom error handler won't apply -- this has to do with my implementing one in IE.au3 and having to be careful not to trounce on one that you are using. You are free to add one without worry.Take a look in the beta docs under ObjEvent to find an example of how to add a COM error handler.You can also use the SciTe Tools -> Add Trace Lines function to trace from whence the error occurs.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...
LovinItAll Posted February 22, 2006 Author Share Posted February 22, 2006 (edited) I have made some changes for users of this forum to try and duplicate the above mentioned error. I gave this to the user I have that is receiving the error, and she gets the error (sometimes) under the following circumstances: - When the .exe launches (She always launches the .exe and does not have the source) - After she hits the "Test Mode" or "Send" button Password for Hotmail is ScriptMe She does not get the error every time. While on the phone with her, she received the error about 20% of the time. I changed $Delay to several values, with the largest being 5000 (5 seconds). expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> ;---Sets various options opt("WinWaitDelay", 100) opt("WinTitleMatchMode", 4) opt("WinDetectHiddenText", 1) opt("MouseCoordMode", 0) opt("SendKeyDelay", 1) ;HotKeySet("^!x", "Exit");---Set Exit method ;---Declare and assign version Dim $Version = "Ver 1.0 Beta" ;---Declare and assign License variable Dim $License = "AutoItUser@hotmail.com" ;----Declare variable for test mode Dim $Test = "F" ;----Declare variables for user input in GUI Dim $Subject Dim $Body Dim $Password Dim $Exit Dim $SendMailButton Dim $TestMailButton Dim $SubjectInput Dim $MailInput Dim $o_IE;---The IE Window object we are operating within Dim $Delay = 1000;---Sets delay for the _IELoadWait function ;MainScreen() ;==========Begin Main GUI======================== ;Func MainScreen() $MailHandler = GUICreate("Mail Handler- " & $Version & " - Licensed to: " & $License & " - MAY NOT BE DISTRIBUTED IN ANY WAY! ", 1016, 734, 193, 115) GUICtrlCreateLabel("Complete the fields below. All Fields Are REQUIRED!", 120, 8, 253, 17) GUICtrlCreateLabel("Subject:", 23, 123, 43, 17) $SubjectInput = GUICtrlCreateInput("", 80, 120, 409, 21, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlCreateLabel("", 576, 176, 4, 4) $MailInput = GUICtrlCreateEdit("", 80, 152, 409, 512, $ES_NOHIDESEL, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlSetData($MailInput, "") GUICtrlCreateLabel("________________________________________________________________________________", 8, 58, 484, 17) GUICtrlCreateLabel("NOTE: You may use any valid HTML code in the body of the mail to be sent.", 8, 80, 484, 17) GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Mail Body:", 14, 154, 53, 17) $TestMailButton = GUICtrlCreateButton("Test Mode", 35, 679, 128, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) $SendMailButton = GUICtrlCreateButton("Send Mail", 200, 679, 129, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") $Exit = GUICtrlCreateButton("Exit", 374, 679, 129, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlCreateLabel("", 704, 48, 4, 4) $Instructions = GUICtrlCreateLabel("", 536, 16, 441, 273, BitOR($ES_READONLY, $WS_BORDER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlSetData($Instructions, "A bunch of user instructions") GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) GUISetState(@SW_SHOW) ;EndFunc ;========================================End Main GUI ;-------Start interface and wait for input While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE;---User clicks the X to close the window ExitLoop Case $msg = $Exit;---User clicks the Exit Button ExitLoop Case $msg = $SendMailButton;----User clicks the Send Mail button Main() Exit Case $msg = $TestMailButton;----User clicks the Test Mail button $Test = "T" Main() EndSelect WEnd Exit ;=================================================================================== Func Main() If $SubjectInput = "" Or $MailInput = "" Then;---Check to make sure all fields have input MsgBox(0, "Input Incomplete", "All fields have not been filled in. Please correct and retry") Return EndIf $o_IE = _IECreate () _IENavigate ($o_IE, "http://login.passport.net/uilogin.srf?lc=1033&id=2") _IELoadWait ($o_IE,$Delay) WinSetState("Sign", "", @SW_MAXIMIZE) $Password = InputBox("License Validation", "Please enter your Password:", "", "*") WinActivate("License Validation") $vMsg = GUIGetMsg() Select Case $vMsg = $GUI_EVENT_CLOSE;---User clicks the X to close the window Exit;--Application exits Case $vMsg = 0;---Entry is valid WinActivate($o_IE) $o_SearchForm = _IEFormGetObjByName ($o_IE, "f1") $o_UserName = _IEFormElementGetObjByName ($o_SearchForm, "login") $o_Password = _IEFormElementGetObjByName ($o_SearchForm, "passwd") _IEFormElementSetValue ($o_UserName, $License) _IEFormElementSetValue ($o_Password, $Password) Send("{ENTER}") Case $vMsg = 1;----User clicks the Cancel button Exit EndSelect EndFunc;==>Main edited for typos -- and I forgot to put the password for Hotmail in the post! Edited February 22, 2006 by LovinItAll Link to comment Share on other sites More sharing options...
DaleHohm Posted February 22, 2006 Share Posted February 22, 2006 Please have the user run this code with debugging added. This will create a file with the trace output and COM error details. Change $DebugFileSpec to suit. Please either post or PM me the results after a COM error. Thanks! Dale expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> ;===== DEBUG CODE #include <Date.au3> Global $DebugFileSpec = "C:\LovinItAll\Au3Debug.txt" $debugFile = FileOpen($DebugFileSpec, 10) FileWriteLine($debugFile, @ScriptFullPath & @CRLF & "Current Time is: " & _NowTime() & @CRLF & @CRLF) $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") ; Initialize a COM error handler ;================= ;---Sets various options opt("WinWaitDelay", 100) opt("WinTitleMatchMode", 4) opt("WinDetectHiddenText", 1) opt("MouseCoordMode", 0) opt("SendKeyDelay", 1) ;HotKeySet("^!x", "Exit");---Set Exit method ;---Declare and assign version Dim $Version = "Ver 1.0 Beta" ;---Declare and assign License variable Dim $License = "AutoItUser@hotmail.com" ;----Declare variable for test mode Dim $Test = "F" ;----Declare variables for user input in GUI Dim $Subject Dim $Body Dim $Password Dim $Exit Dim $SendMailButton Dim $TestMailButton Dim $SubjectInput Dim $MailInput Dim $o_IE;---The IE Window object we are operating within Dim $Delay = 1000 ;---Sets delay for the _IELoadWait function ;MainScreen() ;==========Begin Main GUI======================== ;Func MainScreen() $MailHandler = GUICreate("Mail Handler- " & $Version & " - Licensed to: " & $License & " - MAY NOT BE DISTRIBUTED IN ANY WAY! ", 1016, 734, 193, 115) GUICtrlCreateLabel("Complete the fields below. All Fields Are REQUIRED!", 120, 8, 253, 17) GUICtrlCreateLabel("Subject:", 23, 123, 43, 17) $SubjectInput = GUICtrlCreateInput("", 80, 120, 409, 21, -1, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlCreateLabel("", 576, 176, 4, 4) $MailInput = GUICtrlCreateEdit("", 80, 152, 409, 512, $ES_NOHIDESEL, BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlSetData($MailInput, "") GUICtrlCreateLabel("________________________________________________________________________________", 8, 58, 484, 17) GUICtrlCreateLabel("NOTE: You may use any valid HTML code in the body of the mail to be sent.", 8, 80, 484, 17) GUICtrlSetFont(-1, 10, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) GUICtrlCreateLabel("Mail Body:", 14, 154, 53, 17) $TestMailButton = GUICtrlCreateButton("Test Mode", 35, 679, 128, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) $SendMailButton = GUICtrlCreateButton("Send Mail", 200, 679, 129, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") $Exit = GUICtrlCreateButton("Exit", 374, 679, 129, 41) GUICtrlSetFont(-1, 14, 800, 0, "Times New Roman") GUICtrlCreateLabel("", 704, 48, 4, 4) $Instructions = GUICtrlCreateLabel("", 536, 16, 441, 273, BitOR($ES_READONLY, $WS_BORDER), BitOR($WS_EX_CLIENTEDGE, $WS_EX_STATICEDGE)) GUICtrlSetData($Instructions, "A bunch of user instructions") GUICtrlSetFont(-1, 10, 400, 0, "Times New Roman") GUICtrlSetColor(-1, 0x000080) GUISetState(@SW_SHOW) ;EndFunc ;========================================End Main GUI ;-------Start interface and wait for input While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE;---User clicks the X to close the window ExitLoop Case $msg = $Exit;---User clicks the Exit Button ExitLoop Case $msg = $SendMailButton;----User clicks the Send Mail button Main() Exit Case $msg = $TestMailButton;----User clicks the Test Mail button $Test = "T" Main() EndSelect WEnd Exit ;=================================================================================== Func Main() FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(78) : If $SubjectInput = "" Or $MailInput = "" Then;---Check to make sure all fields have input' & @CRLF);### Trace Console If $SubjectInput = "" Or $MailInput = "" Then;---Check to make sure all fields have input FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(80) : MsgBox(0, "Input Incomplete", "All fields have not been filled in. Please correct and retry")' & @CRLF);### Trace Console MsgBox(0, "Input Incomplete", "All fields have not been filled in. Please correct and retry") FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(82) : Return' & @CRLF);### Trace Console Return FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(84) : EndIf' & @CRLF);### Trace Console EndIf FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(86) : $o_IE = _IECreate ()' & @CRLF);### Trace Console $o_IE = _IECreate () FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(88) : _IENavigate ($o_IE, "http://login.passport.net/uilogin.srf?lc=1033&id=2")' & @CRLF);### Trace Console _IENavigate ($o_IE, "http://login.passport.net/uilogin.srf?lc=1033&id=2") FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(90) : _IELoadWait ($o_IE,$Delay)' & @CRLF);### Trace Console _IELoadWait ($o_IE,$Delay) FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(92) : WinSetState("Sign", "", @SW_MAXIMIZE)' & @CRLF);### Trace Console WinSetState("Sign", "", @SW_MAXIMIZE) FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(94) : $Password = InputBox("License Validation", "Please enter your Password:", "", "*")' & @CRLF);### Trace Console $Password = InputBox("License Validation", "Please enter your Password:", "", "*") FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(96) : WinActivate("License Validation")' & @CRLF);### Trace Console WinActivate("License Validation") FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(98) : $vMsg = GUIGetMsg()' & @CRLF);### Trace Console $vMsg = GUIGetMsg() FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(100) : Select' & @CRLF);### Trace Console Select Case $vMsg = $GUI_EVENT_CLOSE;---User clicks the X to close the window FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(104) : Exit;--Application exits' & @CRLF);### Trace Console Exit;--Application exits FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(106) : Case $vMsg = 0;---Entry is valid' & @CRLF);### Trace Console Case $vMsg = 0;---Entry is valid FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(108) : WinActivate($o_IE)' & @CRLF);### Trace Console WinActivate($o_IE) FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(110) : $o_SearchForm = _IEFormGetObjByName ($o_IE, "f1")' & @CRLF);### Trace Console $o_SearchForm = _IEFormGetObjByName ($o_IE, "f1") FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(112) : $o_UserName = _IEFormElementGetObjByName ($o_SearchForm, "login")' & @CRLF);### Trace Console $o_UserName = _IEFormElementGetObjByName ($o_SearchForm, "login") FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(114) : $o_Password = _IEFormElementGetObjByName ($o_SearchForm, "passwd")' & @CRLF);### Trace Console $o_Password = _IEFormElementGetObjByName ($o_SearchForm, "passwd") FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(116) : _IEFormElementSetValue ($o_UserName, $License)' & @CRLF);### Trace Console _IEFormElementSetValue ($o_UserName, $License) FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(118) : _IEFormElementSetValue ($o_Password, $Password)' & @CRLF);### Trace Console _IEFormElementSetValue ($o_Password, $Password) FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(120) : Send("{ENTER}")' & @CRLF);### Trace Console Send("{ENTER}") FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(122) : Case $vMsg = 1;----User clicks the Cancel button' & @CRLF);### Trace Console Case $vMsg = 1;----User clicks the Cancel button FileWrite($debugFile, '>Error code: ' & @error & @CRLF & @CRLF & '@@ Trace(124) : Exit' & @CRLF);### Trace Console Exit EndSelect EndFunc ;==>Main ;=============== This is my custom defined COM error handler Func MyErrFunc() $HexNumber=hex($oMyError.number,8) ; for displaying purposes FileWrite($debugFile, "We intercepted a COM Error !" & @CRLF & @CRLF & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & @CRLF & _ "err.number is: " & @TAB & $HexNumber & @CRLF & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & @CRLF) MsgBox(0, "Error Encountered", "Application exiting, see " & $DebugFileSpec) Exit; Exit Script Endfunc 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...
LovinItAll Posted February 22, 2006 Author Share Posted February 22, 2006 Thank you, Dale. I also modified this: From: $o_IE = _IECreate () _IENavigate ($o_IE, "http://login.passport.net/uilogin.srf?lc=1033&id=2") _IELoadWait ($o_IE,$Delay) To this: $o_IE = _IECreate () _IELoadWait ($o_IE,$Delay) _IENavigate ($o_IE, "http://login.passport.net/uilogin.srf?lc=1033&id=2") I increased $Delay to 2000 in the script she is running and made certain any instance that might require _IELoadWait does indeed have it. She is no longer getting the error, but if it pops up again, I will send her the trace file and report the results to you. Thank you very much for your help ~ Lee Link to comment Share on other sites More sharing options...
DaleHohm Posted February 22, 2006 Share Posted February 22, 2006 Thank you, Dale. I also modified this: From: $o_IE = _IECreate () _IENavigate ($o_IE, "http://login.passport.net/uilogin.srf?lc=1033&id=2") _IELoadWait ($o_IE,$Delay) To this: $o_IE = _IECreate () _IELoadWait ($o_IE,$Delay) _IENavigate ($o_IE, "http://login.passport.net/uilogin.srf?lc=1033&id=2") I increased $Delay to 2000 in the script she is running and made certain any instance that might require _IELoadWait does indeed have it. She is no longer getting the error, but if it pops up again, I will send her the trace file and report the results to you. Thank you very much for your help ~ LeeLee, one other thing to look for... I've seen strange results if there is a zombie IEXPLORE.EXE running on the system. You may want to have the person get out of all IE windows and kill IEXPLORE.EXE if there is still one on the system after all of the windows are gone. Also, none of the SLEEPs or Delays should be necessary, so if you are feeling brave, please remove them all and see if the error reoccurs. I know you are hoping never to see it again, but I am hoping you do :-) -- I really want to get to the bottom of it so that I never have to answer the question again... Dale 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...
LovinItAll Posted February 22, 2006 Author Share Posted February 22, 2006 Dale, I originally wrote the app without any sleep() functions and I only had _IELoadWait() where you identified the need (_IEClickLinkByText() was one of them, I think--but could be wrong). The problem with the user that is having the problem is that not only is she impatient, but every time she gets an error I get an almost angry reply from her-- even though I gave her the script for free! She was supposed to be part of a test group, but I don't think she understands that concept. Maybe I just caught her on a bad day. After I made some minor changes and increased the delay times, she quit receiving the error. I will contact her and see if she would be willing to help trap the error with the earlier script. Some folks are just not "team players"...... Thank you again for your help. I understand your reasons for wanting this error trapped, and I will do what I can to help. This script is about to be in use by a lot of folks, so I'm sure the issue will present itself again. Thanks again ~ Lee 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