complexjunk Posted April 28, 2009 Share Posted April 28, 2009 I'm trying to get a program to work with Citrix published apps, which provide programs without full desktops. They seamlessly integrate with your existing windows. When the program reaches this line: $oIE = _IECreate("https://websiteblah.whatever", 1) it will produce a window popup: AutoIt Error Line -1: Error: The requested action with this object has failed. I can run the program if it has a full desktop without error. Also, I can run a "published" version of AutoIt Window Info which will interact with other published apps. So, they are running within the same user space, the same session. For some reason, the problem lies with how IE windows are created when my app is published. Does anyone have a suggestion as to what I could do to troubleshoot this? Link to comment Share on other sites More sharing options...
DaleHohm Posted April 28, 2009 Share Posted April 28, 2009 Suggest you run the script as an .au3 instead of compiled to get more information. Also add _IEErrorHandlerRegister() to get a more detailed COM error description to the console. 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...
complexjunk Posted April 29, 2009 Author Share Posted April 29, 2009 (edited) Strange, simply adding _IEErrorHandlerRegister() allows it to create a new window! But it does not attach to any existing windows. --> COM Error Encountered in cal_DebugIt.au3 ----> $IEComErrorScriptline = 398 ----> $IEComErrorNumberHex = 80020009 ----> $IEComErrorNumber = -2147352567 ----> $IEComErrorWinDescription = Class not registered ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 --> COM Error Encountered in cal_DebugIt.au3 ----> $IEComErrorScriptline = 400 ----> $IEComErrorNumberHex = 000000A9 ----> $IEComErrorNumber = 169 ----> $IEComErrorWinDescription = Variable is not of type 'Object'. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 --> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch 0562: 0-0: $oFrame = _IEFrameGetObjByName($oIE, "frGlobalNav") --> IE.au3 V2.4-0 Warning from function _IEFrameGetObjByName, $_IEStatus_NoMatch (No Frames found) 0563: 7-2: $oForm = _IEFormGetCollection($oFrame, 0) --> IE.au3 V2.4-0 Error from function _IEFormGetCollection, $_IEStatus_InvalidDataType 0565: 3-1: $oName = _IEFormElementGetObjByName($oForm, "here") --> IE.au3 V2.4-0 Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType 0566: 3-1: $sendtoPRG = _IEFormElementGetValue($oName) --> IE.au3 V2.4-0 Error from function _IEFormElementGetValue, $_IEStatus_InvalidDataType Otherwise, these are the errors without that line: 0517: 1-0: $oIE = _IECreate("https://removed.url", 1) C:\Program Files\AutoIt3\Include\IE.au3 (398) : ==> The requested action with this object has failed.: Local $o_ShellWindows = $o_Shell.Windows() Local $o_ShellWindows = $o_Shell.Windows()^ ERROR ->10:05:29 AutoIT3.exe ended.rc:1 Edit: discovered new issues, added COM errors Edited April 29, 2009 by complexjunk Link to comment Share on other sites More sharing options...
DaleHohm Posted April 29, 2009 Share Posted April 29, 2009 Suggest you turn on SciTe debug mode to follow your main script execution surrounding the COM errors. 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...
DaleHohm Posted April 30, 2009 Share Posted April 30, 2009 BTW, the Class not registered looks like a smoking gun... 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...
complexjunk Posted April 30, 2009 Author Share Posted April 30, 2009 Suggest you turn on SciTe debug mode to follow your main script execution surrounding the COM errors. DaleThis code: #include <IE.au3> #AutoIt3Wrapper_run_debug_mode=Y _IEErrorHandlerRegister() _IECreate("about:blank",1) Produces this in SciTe's debug console: !> Starting in DebugMode.. Line: @error-@extended: Line syntax 0001: 0-0: #include <IE.au3> 0002: 0-0: #AutoIt3Wrapper_run_debug_mode=Y 0003: 0-0: _IEErrorHandlerRegister() 0004: 0-0: _IECreate("about:blank",1) --> COM Error Encountered in ie_DebugIt.au3 ----> $IEComErrorScriptline = 398 ----> $IEComErrorNumberHex = 80020009 ----> $IEComErrorNumber = -2147352567 ----> $IEComErrorWinDescription = Class not registered ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 --> COM Error Encountered in ie_DebugIt.au3 ----> $IEComErrorScriptline = 400 ----> $IEComErrorNumberHex = 000000A9 ----> $IEComErrorNumber = 169 ----> $IEComErrorWinDescription = Variable is not of type 'Object'. ----> $IEComErrorDescription = ----> $IEComErrorSource = ----> $IEComErrorHelpFile = ----> $IEComErrorHelpContext = 0 ----> $IEComErrorLastDllError = 0 --> IE.au3 V2.4-0 Warning from function _IEAttach, $_IEStatus_NoMatch +>09:45:11 AutoIT3.exe ended.rc:0 +>09:45:12 AutoIt3Wrapper Finished >Exit code: 0 Time: 3.713 BTW, the Class not registered looks like a smoking gun... DaleI'm not really sure where to start with that. I don't see a lot of other posts with "Class not Registered" issues on the forum. This error does not come up in a "full desktop" mode with Citrix, so I'm not sure what Citrix is doing to IE in published app mode. Link to comment Share on other sites More sharing options...
DaleHohm Posted April 30, 2009 Share Posted April 30, 2009 I don't know either. Suggest you take AutoIt out of the picture by testing with the following vb script: set oIE = CreateObject("InternetExplorer.Application") oIE.visible=1 oIE.navigate("msdn.microsoft.com") 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...
vyper0 Posted April 30, 2009 Share Posted April 30, 2009 Try this way...CODE#include <GUIConstants.au3>; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI;; The full example is available in the test\ActiveX directory (TestXInternet.au3);; See also: http://msdn.microsoft.com/workshop/browser...netexplorer.asp$oIE = ObjCreate("Shell.Explorer.2"); Create a simple GUI for our outputGUICreate ( "BOBCO Embedded Web Broswer", 1024, 768,(@DesktopWidth-1024)/2, (@DesktopHeight-768)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)$GUIActiveX = GUICtrlCreateObj ( $oIE, 0 , 0 , 1024 , 768 )GUISetState () ;Show GUI$oIE.navigate("http://www.google.com");Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WendGUIDelete ()Exit Link to comment Share on other sites More sharing options...
complexjunk Posted April 30, 2009 Author Share Posted April 30, 2009 I don't know either. Suggest you take AutoIt out of the picture by testing with the following vb script: set oIE = CreateObject("InternetExplorer.Application") oIE.visible=1 oIE.navigate("msdn.microsoft.com") Dale (BTW, thank you for the help so far.) Published mode: A blank copy of IE7 is launched, a second copy is opened up that goes directly to msdn.microsoft.com Desktop mode: IE7 opens and seems to directly go to msdn.microsoft.com Link to comment Share on other sites More sharing options...
complexjunk Posted April 30, 2009 Author Share Posted April 30, 2009 Try this way...CODE#include <GUIConstants.au3>; Simple example: Embedding an Internet Explorer Object inside an AutoIt GUI;; The full example is available in the test\ActiveX directory (TestXInternet.au3);; See also: http://msdn.microsoft.com/workshop/browser...netexplorer.asp$oIE = ObjCreate("Shell.Explorer.2"); Create a simple GUI for our outputGUICreate ( "BOBCO Embedded Web Broswer", 1024, 768,(@DesktopWidth-1024)/2, (@DesktopHeight-768)/2 , $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS)$GUIActiveX = GUICtrlCreateObj ( $oIE, 0 , 0 , 1024 , 768 )GUISetState () ;Show GUI$oIE.navigate("http://www.google.com");Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WendGUIDelete ()ExitI didn't try your example, but I tried similar code for an embedded GUI earlier and it seemed to work fine. This isn't a practical solution, as attaching is the most important part of my program. In one part of my code, I even need to attach to a separate program's embedded IE window to click on a link. I haven't tried pulling data out of the AutoIt embedded IE, though, just navigation. 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