Multiple key press without 'Send hotkey' command

keyboard

#1

Is there a way to get the robot to press multiple keys at the same time using type commands and not ‘send hotkey’ commands? I am trying to get my robot to hit ctrl+a and then hit delete to clear an input box, I would like to use tab to do this over multiple input boxes without using the mouse in between.

Cheers


#2

Hi @campbellmellor
You can use the shortcut key as ctrl +a and delete and use tab as well by using type into with no selector

Thanks
Ashwin.S


#3

HI @campbellmellor,

In Type into activity itself “EmptyField” Property is ther you can check that checkbox to before typing the value it will clear the previous value and typing new value.

Refer this link

Regards
Arivu


#4

I want to clear the next input box that the robot goes to after tab is pressed. Something like
[k(tab)][k(ctrl)][k(a)][k(back)]
however this doesn’t work as I need to press the ctrl and a keys a the same time.


#5

Hi. I am facing a similar issue where I need to press the Alt and Down arrow keys at the same time.I tried this using the Type into activity, but apparently its releasing Alt key before pressing the down key. Please help !


#6

@a2dhanja I’d suggest using a Send Hotkey Activity (to press ALT+DOWN) followed by a Type Into Activity (to do the rest). You don’t have to try to fit everything into a single activity.


#7

This surely helped. Thanks ! @PathLessTaken :slight_smile: :star2:


#8

One small extension to my question, using Send hotkey, can I select 3 consecutive cells in excel using Shift+Right+Right ? It seems to only take one Right value


#9

@a2dhanja I’ve done a lot of things with Excel. It’s pretty tricky trying to select cells with click activities or hotkeys, not to mention unstable. Try this. Open an Excel Application Scope Activity. Then use the Select Range Activity inside the scope and select the three cells that you mentioned. This activity is very stable.


#10

@pathLessTaken I can go for alternatives, but my limitation is that I know my starting cell, but dont know how much i may have to navigate, hence , I am wanting to use the SEnd HotKeys option. To elaborate, I have a table, I know the top left corner of the table, but do not know the other corners, and want to dynamically select the table. Is there another way of achieving this using the Excel related functions ?


#11

@a2dhanja if that’s the case then I suggest you Send Hotkey CTRL+SHIFT+RIGHT. This will always include the right-most cell as part of your selection. You can also get about with this using the Select Range Activity but you need a couple more steps, such as reading the row, counting the columns, assigning the column count to a variable, and then setting the variable as the end of the range in Select Range.


#12

I would stay away from key stroke combinations to navigate a table, because the data is too dynamic. Like if there is an empty cell then the Ctrl+Right will stop on that empty cell, unless you know for a certain it will have a value in each cell all the way to the right. Technically, you can also use Select Range of XFD1, then use Ctrl+Left if there are empty cells potentially. Another option is the Ctrl+End which jumps to bottom right corner of data, however, if Excel still contains some hidden data it will not be accurate (unless you do a Clear All first).

Another solution to consider would be to the Ctrl+F to search for a keyword. Like if you know the column name of a specific column, then you can jump right there and there is no worry of a column changing positions on you.

But saying all this, I would suggest possibly looking at your data as a Data Table using a Read Range. If you get a Data Table, then you can use .Rows.Count and .Columns.Count to your advantage. You can also learn some LINQ methods that get your data manipulations working like a Pro. — .Rows.IndexOf() and .Columns.IndexOf() are also useful for finding locations in the middle of your data to be used for cell locations, et cetera. Then, there are various ways to update your data through Write Cell or Assign activities/Write Range, et cetera.

I hope my additional pointers are helpful to you.

Regards.