Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in RPA by (5.3k points)

I'm curious to know how Top RPA tools like AA and UiPath simulate keystroke to the applications. I've built an application with use of Keybd_event to simulate keystrokes but I keep facing the issue of scan code parameter of keybd_event - as it required to perform keystroke in Citrix environment.

private void PressKeyVK(int eKeys, bool bHoldKeydown, bool bRelease) { int lScan, lExtended; lScan = MapVirtualKey(eKeys, 1); lExtended = 0; if (lScan == 0) lExtended = (int)KeyBoardEventEnums.KEYEVENTF_EXTENDEDKEY; lScan = MapVirtualKey(eKeys, 0); if (!bRelease) keybd_event((byte)eKeys, (byte)lScan, (uint)lExtended, UIntPtr.Zero); if (!bHoldKeydown) keybd_event((byte)eKeys, (byte)lScan, (uint)KeyBoardEventEnums.KEYEVENTF_KEYUP | (uint)lExtended, UIntPtr.Zero); }

1 Answer

0 votes
by (9.5k points)

RPA is such a versatile tool, it uses different technology for a different layer. 

 For Local machines, it uses sendmessage and postmessage APIs. For thin layer applications such as RDP and Citrix, it simulates software keypress similar to application.sendkeys

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 22, 2019 in RPA by noah kapoor (5.3k points)
0 votes
1 answer
asked Jul 22, 2019 in RPA by noah kapoor (5.3k points)
+1 vote
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...