Send Hotkeys multiple times

Hi,

I need to press down arrow 10 times holding ctrl+shift keys how can I achieve this I don’t find an option in sending hotkeys.

Hi @Babjee.Vangipurapu

Check the below thread

Regards

The “Repeat Number of Times” activity.

However, pressing the down arrow 10 times probably isn’t the best solution. What are you trying to do, scroll the page down? Give us some details so we can actually help.

Just use the Repeat Number of Times activity.

1 Like

Hi @postwick ,

In one of the process that I’m automating there is a web application in which I’ve a combobox inside which there are like ~1800 IDs which should be selected in batches of 10s or 50s. So in order to select them I need press ctrl + shift +down arrow(10s or 50s we desired of).

1 Like

Got it. That’s actually a good use case for needing to repeat the down arrow.

Hi @postwick ,

Is there any other way of achieving this other than the one suggested above by @vrdabberu

@Babjee.Vangipurapu

  1. Define Variables:
  • counter: Integer, default value = 0
  1. While Activity:
  • Condition: counter < 10
  1. Within the While Activity:
  • Send Hotkey Activity:
    • Key: Down
    • Modifiers: Ctrl (checked), Shift (checked)
    • Indicate the target element on screen where you want to send the hotkeys.
  • Assign Activity:
    • To: counter
    • Value: counter + 1

Or use TypeInto activity with following expression:

"[d(ctrl)][d(shift)]" + string.join("", Enumerable.Repeat("[k(down)]",10)) + "[u(ctrl)][u(shift)]"

Explanation
[d(ctrl)] - press and hold Ctrl key
[d(shift)] - press and hold Shift key
string.join(“”, Enumerable.Repeat(“[k(down)]”,10)) - type Down key 10times
[u(ctrl)] - release Ctrl key
[u(shift)] - release Shift key

Cheers

1 Like

Yes. Just use the Repeat Number of Times activity.