Pass Variable into Keyboard Shortcuts

I am working on a process and I want to loop through an excel file and pass the data from the excel file as a keyboard shortcut.

For example:
row 1 | [k(tab)]
row 2 | [k(tab)][k(tab)]
row 3 | [k(tab)][k(tab)][k(tab)]

Is there a way to pass that data to the keyboard shortcut?

@Sean_Collins

Welcome to the community

You can pass them…

Read the excel as datatable usingn read excel or use excel file and read range activities…then use for reach row in datatable and then in the keyboard shortcuts field give currentrow(0).ToString…so that shortcut will be taken one after another in loop

Else dt.rows(1)(0).ToString will give the second row first column value

You can try any of those depending on requirement

Cheers

1 Like

Hello @Sean_Collins
If you need to repeat the Secific Hot Key for certain Count, Then try this.
Data should be in number count how much need to loop the Hot Key
Use While with True Condition and pass the Count in Max Iteration Property. In whickh place the Send hot key, it loops untill the max iteration count.

1 Like

It would be simpler to just store a number representing how many times to tab and use a Repeat Number of Times activity that you pass that number into.

The Repeat Number of Times activity would be much simpler than that.

Paul. Thank you! That worked really well.

I do think if there was an easy way to pass keyboard shortcuts as a variable it would be a powerful feature.

I think you can use the [k(tab)] notation in the Type Into activity. But I’m not sure if you can store it in a variable.