Monitor Event - Hotkey trigger

Hello Everyone,

I would like to monitor and count the number of tab keys pressed in a citrix window screen for a particular element.For ex: let’s say there is an image as shown as below. I would send 10 tab keys to that window. If tab number 8 results in “Find What” field, I can say that Stop button is disabled. If tab number 9 results in “Find What” field, I can say that stop button is enabled( As the “Stop” button is active, it consumes one tab press). If you are wondering why can’t I use a image exists activity as I am working in citrix window, the issue is complicated. As the difference between enabled and disabled button is very minute, it doesn’t work as expected.( Refer the post - Citrix Automation - Recognize whether button is enabled/disabled - #15 by Madhavi)
Main.xaml (7.7 KB)

I am just starting with hotkey trigger and monitor events, I tried with normal tab detection in a word doc but it doesn’t seem to work. Can anyone please help me? The below xaml file does press a tab in word doc, but I don’t see any message being triggered even though I have got a message. I have attached the xaml file and can you also let me know whether it is possible to monitor the hotkey press activity by robot in citrix environment. I have attached a screenshot of citrix window below

1

Kindly help

Hi @Selvasathappan, I edited your main.xaml, It should be working now. You have to manually press tab in your word doc after running the process.
Main.xaml (7.1 KB)

For citrix environment, you have to use On Click Image activity.

Cheers. Happy Automation. :slight_smile:

@quihan, I don’t wish to do this manually. I wish to monitor the robot send hotkey activity in citrix. If it’s image, irrespective of whether the button is enabled or disabled, it will click the image. Am I right?

Thanks
Selva

Hi @Selvasathappan, I don’t think you can continuously Monitor Event and want the robot to send Tab keys simultaneously. If the robot its sending the hotkey, you can calculate the Tab Trigger in your workflow. The robot can differentiate the enabled and disabled button if their background is different.

Cheers.

Hello Quihan,

As you can see in the below post,

The difference bertween active and disabled button is very minute, I am not able to capture that accurately. Sometimes even for valid records, it doesn’t work as expected.

And can you also please let me know how to calculate the ta b trigger n my workflow? I mean I wuld like to press tab key let’s say for 10 times, out of which two times (Tab 5 and Tab 10) the cursor will be in stop field. I would like to get these values when the cursor is in stop field

Hi @Selvasathappan,Stop field as in the one at the bottom of the screen or stop button? The calculate the Tab Trigger, you can use a variable as a counter. Every time the workflow executes send hotkey you can increase the counter.

If you can refer my screenshot, I am talking about the Stop button which is highlighted in red. I understand that I can have a counter. To help you better understand, Let me explain in detail

In the screenshot shown above, I have to press tab 8 times (based on number of individual items seen on screen. I verified it. It takes 8 tab in total to navigate to each and every element/item) to complete one cycle. Now that stop button is disabled, it would take only 7 tabs(As stop button is disabled, tab press would not be sent to stop button. Instead it would go to the first button/field which is “Find What” field.

By doing this, I can find whether a button is enabled/disabled. Do I make sense?

Ex: Step 1 - let’s say I send hotkey 20 times(1st tab - Find What , 2nd Tab - Small arrow, 3rd Tab - Find Next etc)
Step 2- After 8 tabs, 9 th tab would again be in “Find What” field. However when the stop button is disabled, 8th tab would be in Find What field. Hope it helps you.

Can you please help me with this?

Actually I could do this using image exists to find whether stop button is enabled/disabled. Since the difference between Stop button active and disabled is very minute, image exists fail in capturing the difference

When will you able to detect the stop button is enabled/disabled? During tabbing or before you start tabbing? And may I know your objective of doing this?

Cheers.

Am not sure whether you had a chance to look at the post which I sent earlier. Sharing it here for your convenience.

Does your progress bar always stop at the same location?

If a record is not found, Ther progress bar takes 13 seconds to load fully(filled with green color) and then a pop up displays with a message that “Restart search”. Whereas if a record is found, result appears instantly within a second. The problem is I cannot wait for 13 seconds or all the records. Usually out 100 records, only 3 records are not found. rest 97 are found instantly. Just for those 3 records, I cannot afford to induce a delay of 13 second for each record

Since the disabled/enabled button is not working for you and can’t wait for 13 seconds, your only bet is to go with the progress bar. So when you click find, use Image Exists to check whether the empty progress bar exists (Maybe include 1 or 2 seconds delay). If the empty progress bar exists, means found else not found.

Cheers. Hope this helps.