Possible to send hotkey down to repeat based on variable?

Hey,

So I have a list that i need to click down on (send hot key). Is it possible to repeat the hotkey down based on a variable?

say if the variable is 2, i want to send hotkey down twice.

Possible?

@Asanka

Hey,

Yes it is possible.
You can use a loop for this.
For ex. If variable value is 2.

int count=0

while(value<=count)
{
sendHotkey();
} 

Hope this will help you understand.

string.Concat(Enumerable.Repeat("[k(down)]", 2))

4 Likes

@bcorrea you are the best!

1 Like

Last question:

How do I send hotkey that is a variable?

I want to send crtl + variable

1 Like

Great!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.