Reputation: 41
I need to automate 1 system where 1 step is to press right ctrl key (left ctrl key doesn't work).
I have already tried sendkeys method but its not working.
Is there any other way to send/press right ctrl key in VB Script?
Thanks in advance.
Upvotes: 2
Views: 2145
Reputation: 41
Alright, I used DeviceReplay.
Here is the piece of code..
Set DeviceReplay = CreateObject("Mercury.DeviceReplay")
DeviceReplay.PressKey 157
we need to send Asc code as parameter of Presskeys. (157 is asc code)
Further info on finding asc code for other keystrokes.
Upvotes: 1
Reputation: 435
There is no way to accomplish this using the QTP tool as far as I know. But you can resort to pure VBscript (outside QTP) and use another tool.
Edit: Wow. I stand corrected.
Upvotes: 0
Reputation: 15400
Have you tried autoit
?
https://www.autoitscript.com/autoit3/docs/appendix/SendKeys.htm
{RCTRL}
for right ctrl
{LCTRL}
for left ctrl
Upvotes: 0