Issue with Send HotKeys

Hello.

I have a weird behavior with my script. I tried to search before posting but nothing found.
Sometimes when I use the Send HotKeys activity, some keys are not released (alt or shift for example) and the script crashes because the other actions are impacted.

I am using a VM if matters.

Did someone got a similar problem ?

Thank you.

Hi,

Yes i have had a similar issue when using the send hotkey activity through RDP sessions to a VM. Our problem was when we used send hotkey (ctrl + c) it sometimes typed the char “c” instead of copying the selected text. We solved it by using mouse clicks instead.

Best regards,
Andreas

Hello.

Thank you for the tip.
I will try it and keep you in touch.

You can also use TypeInto if you continue to have issues.
k is for keypress
d is for down keypress
u is for up keypress

For example,
TypeInto “[d(ctrl)]c[u(ctrl)]”

Then adjust the delay between characters.

You can use multiple key combinations in one line if you want as well. But, beware that it performs quickly so you might need a slight delay between actions.

Regards.

16 Likes

Very nice tip.

Thank you.

I tried sending hotkeys to Desktop but getting the error below, please anyone resolve this, See Error image is
Capture

workflow file image is

Hotkey

  1. Don t Indicate the desktop, leave the send hotkey activity as it is
  2. You should send win+r not win+R
  3. When doing the type in, before, i would suggest an activate window to make sure you have it selected

Do you know how to use type into activity for “ctrl” + v?

Yeah, like I mentioned above,
k => keypress
d => down keypress
u => up keypress

So, if you put this into a string you get: "[d(ctrl)]v[u(ctrl)]"

You can place that string in the Type Into activity, and it will press down control, type v, then release up control; if you don’t release the control key, it will be stuck down.

Regards.

5 Likes

sent the hot key without selecting the desktop.

Hi,
I am using “[k(ctrl)][k(sub)][k(ctrl)][k(sub)][k(ctrl)][k(sub)]” for zoom out a pdf file. I want to zoom out a pdf for 3 times. But its not working.
Please give suggestions.
@ClaytonM

I would suggest not using keystrokes to zoom out, but use the Zoom field in the menu bar. You should be able to set that to a number of your choice like 50 or 75 etc

if you do need to use keystrokes though, I’m not sure what the “sub” button is. Is that the “subtract”? If so, use the dash instead… "[d(lctrl)]---[u(lctrl)]"
so it holds down control, presses dash 3 times, then releases the control key.

EDIT: also, use lctrl or rctrl, not ctrl, because ctrl can be glitchy

Regards.

Hi,
Above solution is not working.
Internet Explorer zoom is disable, It permanently set to 100%.
Any other solution?

It’s usually a good idea to download the document first rather than interact inside a web browser, but it depends on what you are trying to do.

If you can provide the steps you are taking when doing it manually, and then any screenshots or .xaml files of what you are trying to do, then we can make better suggestions.

Thanks.

Main.xaml (30.7 KB)

There is a E-PDF file, which I download in folder. Now I am opening the pdf file, but my IE zoom is set to 100%. So I want to use zoom out, Because later I am using screen scrapping to scrape the data from pdf. So I want to set my pdf as all the scrapping data is visible on page, if not then screen scrapping giving me error.

Are you able to open the PDF using a PDF Reader like Adobe?
Also, if you are opening it in IE, how are you “manually” zooming out?

By ctrl and - key…

You’ll need to provide screenshots of your activities or place them outside of the ForEach… you have the new version of ForEach which isn’t compatible with my Studio version. Sorry.

Main.xaml (30.6 KB)

Please check it.

I saw a few problems with this activity:
image

You have spaces before and after, which could interrupt.
Should be like this:
image

Secondly, you don’t have a selector. While this won’t necessarily make it not work, it will be good if you use a selector so it will only perform the keystroke on that element.

I don’t know if that will solve it, but hope it helps some.

Regards.

1 Like