Press Menukey In Citrix Environment

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
Neib74656
Junior Coder
Posts: 29
Joined: Fri Sep 10, 2021 10:51 pm

Press Menukey In Citrix Environment

Post by Neib74656 » Sat Oct 09, 2021 7:06 pm

Hello Everyone,

I am trying to write a script that contains Press Menukey for an automation in the Citrix Workspace environment.

I have been at it for a long while trying to get this to work. I have tried setting the SK_Legacy to 1 and 0 and it just absolutely will not function. However, if I press the menu key on my keyboard it works.

Thinking there may be an error in my script I have written a script that does nothing but presses the Menukey just to make sure my larger script does not have an error. This also did not work.

What I have noticed through manual user input in the Citrix environment is the menu key only opens the menu upon release of the menu key. Holding down the menu key results in no response from the program until the key is actually released. Since Macro Scheduler does not have a release menu key button is there any other work around for this.

Also note that Shift+F10 does not work in the program I'm trying to automate in either.

As always any help is greatly appreciated.

Neib74656
Junior Coder
Posts: 29
Joined: Fri Sep 10, 2021 10:51 pm

Re: Press Menukey In Citrix Environment

Post by Neib74656 » Fri Oct 15, 2021 3:25 pm

Anyone have any suggestions?

User avatar
JRL
Automation Wizard
Posts: 3524
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Re: Press Menukey In Citrix Environment

Post by JRL » Fri Oct 15, 2021 5:35 pm

My first thought was I don't have Citrix to test with". So I brought up Remote Desktop and tried that. The menu key works fine if pressed manually but the Macro Scheduler function Press MenuKey does not work with Remote Desktop either.

What did work for me in RDP was to right click on the remote application window. Brings up the same menu as a MenuKey press.

Code: Select all

Wait>2

SetFocus>Your Citrix Window Name*

Wait>2
//Move to a location where a right click on the application
//displays the menu you desire.
MouseMove>1250,550
Wait>0.1
RClick
//press menukey
Wait>2
//Send whichever character keys are needed to navigate the menu.
//I could have put both keys in one Send> but chose not to.
Send>v
Wait>2
Send>d
Wait>1
MDL>done

Neib74656
Junior Coder
Posts: 29
Joined: Fri Sep 10, 2021 10:51 pm

Re: Press Menukey In Citrix Environment

Post by Neib74656 » Sun Oct 17, 2021 9:17 pm

This is what I thought I would have to do. The issue is I was trying to avoid using image recognition as it is very slow, and the menu item I need comes from an object that does not have a static position but is accessible using the down arrow key for example.

Thank you for the suggestion though.

I think for this one Citrix will defeat me and I will have to approach this automation from a less efficient method. Though not having a person do the task is still a bonus!

User avatar
Grovkillen
Automation Wizard
Posts: 1128
Joined: Fri Aug 10, 2012 2:38 pm
Location: Bräcke, Sweden
Contact:

Re: Press Menukey In Citrix Environment

Post by Grovkillen » Mon Oct 18, 2021 1:19 am

And it's not possible to add a new keyboard shortcut/hot key to open up the menu?
Let>ME=%Script%

Running: 15.0.27
version history

Neib74656
Junior Coder
Posts: 29
Joined: Fri Sep 10, 2021 10:51 pm

Re: Press Menukey In Citrix Environment

Post by Neib74656 » Thu Nov 11, 2021 5:16 pm

Unfortunately not I had explored this option also.

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