Jump to content

Citrix Published Apps and IE.au3


Recommended Posts

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

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

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 by complexjunk
Link to comment
Share on other sites

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

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

Suggest you turn on SciTe debug mode to follow your main script execution surrounding the COM errors.

Dale

This 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...

Dale

I'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

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

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 output

GUICreate ( "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

Wend

GUIDelete ()

Exit

Link to comment
Share on other sites

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

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 output

GUICreate ( "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

Wend

GUIDelete ()

Exit

I 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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...