WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE COM ADO CDO ADSI LDAP
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Interacting with Citrix

 Keywords: Citrix Sendkey Roboscripter COM OLE Winbatch automate

Question:

Has anyone had any experience working within Citrix? We have an application that most users access through a Citrix client. When we try and use Roboscripter on the screen, it only sees on giant picture. What I am wondering is if anyone has been able to interact with an application inside a Citrix client? Any examples would be help full. I have seen the articles in the Tech Database saying that it is best to run the app on the Citrix Server, but I am wondering if anyone has explored any API's or any other way to interact with apps in Citrix.

Answer:

The biggest issue is that although Citrix can present an application's window(s) locally on your desktop in a seamless manner, all you're seeing is is a locally rendered bitmap of that window's contents. The actual window only exists on the Citrix server in a user session, and all of that window's controls are themselves other types of child windows. Only code running in that same user session on the Citrix server is capable of interrogating & manipulating those child windows [e.g. controls]. This is what the RoboScripter utility does, as well as the Control Manager extender. When the Citrix client presents a rendered view of that window locally on your system, you're not able to have a local program interact with the controls that window contains.

As far as API functions go, your choices are pretty limited. Value-added functionality, like having your Citrix session being able to access the local drives & printers on the system where the Citrix client is running, is implemented by way of something known as Virtual Channels. A DLL loaded by the Citrix client and corresponding code executing in the Citrix user session can communicate with each other via Virtual Channels. If you take the time to write the code at both ends, you can pretty much use this mechanism as a proxy that does work in the Citrix user session on behalf of the local system. The tricky part is getting the necessary code onto the Citrix server and configured within your Citrix client. It's not some arbitrary thing that you do spur-of-the-moment w/o any software installation work done in advance of needing to make use of Virtual Channels. As such, it's a mechanism that might not meet your needs, or it may go beyond the effort you are willing to invest in the development of such software.

User Reply:

I have been reading this: http://support.citrix.com/servlet/KbServlet/download/12244-102-16084/icasimapi.pdf. It seems that this may be a way to interact with a screen that is in a Citrix session, but I don't know if this REALLY does what I am looking for or if it is similar but not quite what I need. It looks like I may need to code in VB but it does say it supports any COM capable programming language.

Answer:

I have no idea if it does what you are looking for but a very quick scan of the document would seem to indicate that it supports COM events for scripting languages. Generally, that translates into COM Automation events which WinBatch does support. Of course your mileage may vary.

It looks like it will provide you with functionality equivalent to WinBatch's SendKey*() and Mouse*() functions w/respect to simulating user input for a window in a Citrix session, as well as providing window enumeration functionality similar to what is present in WinBatch.

What it is missing, though, is functionality similar to what is present in the Control Manager extender, so directly reading the values of controls in a window, or directly manipulating controls in a window still won't be possible when the window is running in a remote Citrix session.

The other possible caveat to consider, based on those docs, is whether or not you can get a COM object reference to an existing session already created by the Citrix client. I can't tell if this COM interface only works with new sessions that were created explicitly via a scripting language, or if it works with existing sessions that are showing a window on the user's desktop.


Article ID:   W18021
Filename:   Interacting with Citrix.txt
File Created: 2009:07:08:08:16:18
Last Updated: 2009:07:08:08:16:18