Macro Recording Problem with citrix based application

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
cwalter
Newbie
Posts: 5
Joined: Wed Jun 25, 2003 6:12 am

Macro Recording Problem with citrix based application

Post by cwalter » Sat Jun 28, 2003 1:25 am

Macro Scheduler Pro 7.2.036
Operating system is Windows 2000.

Problem Encountered
-------------------

Wish to record the mouseclicks/keystrokes for starting of a citrix based application, logon, movement through some of the application menu options, and exiting of the citrix application.

I have tried doing this using the Run – Record menu option in the Macro Scheduler – with both the ‘Record Window Names and Positions’ and ‘Ran this application First’ checkboxes checked.

(The command line for the citrix application being started is:
c:\Program Files\Citrix\ICA Client\pn.exe /PNI etc.)

When recording the macro the following happens:

1. Get a logon prompt – login with a specific username/password/domain.

2. Get the Citrix Program Neighbourhood – Custom ICA Connections window up.

3. Double-click on the particular citrix application icon in the window.

4. Get the citrix application’s username pop up appearing. You would normally click on the username field in the pop-up to get focus and then enter the appropriate username and press enter. However, when this is done during macro recording you cannot get focus on the window, and so cannot enter the username. At this point I have to hit shift-Esc to stop the macro recording. I can then get focus on the username pop-up.

Have anyone encountered this sort of problem before?

Does anyone know of a workaround? Maybe changing some Windows 2000 settings?

I would be very grateful for any advice anyone can give me.

Thanks,

Craig Walter.

Lumumba

Post by Lumumba » Sat Jun 28, 2003 5:47 am

Try to detect the windows title.
Start the script and reset the focus to the relevant window within 2 sec.

Code: Select all

Wait>2
GetActiveWindow>windowtitle,X,Y
Message>%windowtitle%%CRLF%xpos: %X%%CRLF%ypos: %Y%
If once detected it should work to reset the focus with the SetFocus>command.

Code: Select all

SetFocus>%windowname%
BTW: would have been helpfull to get a snipet of your code. Recorded scripts have often a timing issue ...!

Lumumba

Post by Lumumba » Sat Jun 28, 2003 6:20 am

If it's not possible to detect a windows title, have a try with the GetPixelColor>command (or the FindWindowWithText>command).

Check for a unique pixel color in that login screen (hope it has a fixed position).

Code: Select all

Let>ID=HarveyKeitel

Label>PixColCheck
Wait>1
GetPixelColor>200,200,result
If>result=255,UserID,PixColCheck

Label>UserID
MouseMove>210,210
LClick
Send>%ID%

cwalter
Newbie
Posts: 5
Joined: Wed Jun 25, 2003 6:12 am

Post by cwalter » Tue Jul 01, 2003 4:55 am

Thanks for the suggestions. I will give them a go.

Cheers,

Craig Walter.

Lumumba

Post by Lumumba » Sun Jul 18, 2004 8:42 pm

Free freestanding Perl executables. I know that these are large by C standards for small single purpose programs, but they work well. The source code in most cases has been made available for those that just want to learn Perl or have Perl installed and want to add your own additional functionality.
ClientData.exe (613K) Ver: 0.5.0.0
When executed in a Citrix or Terminal server session the program output details of the connecting client. Tested on Windows 2000 as an admin. I would be interested in knowing your experiences with other client operating systems. ::habullock at comcast dot net::
[Download]

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts