Hold Down Key for Set period?

Is it possible for Uipath to hold a key down for example any letter from A-Z for a set period say 1000miliseconds?.

@sam71,

Have you tried with Key press triggers.

Please follow below thread:

1 Like

Hi @sam71,

What is your requirement here, by holding down key for any letter for 1000ms what are you trying to achieve, could you provide more information.

@lakshman @anil5 The issue I have is I am trying to inject keys into a window called “Remote Play” which is an application by Sony for the PS4. Using UiPath the keys do not get injected into the window because the key press is too quick (accelerated). I wish to slow down the process to 500milsec per key or however long it takes for the injection to take place.

Hi @sam71,

So we have something called delay between keys, have you used this property and provide 500ms

Can you explain your flow or which activities are you using?

Hi @anil5 Both delay before and after do not hold the key down, I tried it.

I am talking about delay between keys property not delay before and delay after and not delay activity.

Can you help us with your activities, so its easy to understand

Main / Sequence / Type Into 'RemotePlay.exe / “v”

@Anil584

@anil5 Yes I have tried delay between keys now. Keys are still not injecting into the window.

@anil5

Hi @sam71,

Can you use small “v” and try.

Inject into the window in the scense, what you are trying to do, double click on the window.

I got the doubt because you are using type into and are you trying to type v somewhere.

@anil5 I have tried small “v”, still nothing. The “v” key is remapped to the cross button on the ps4 controller, where on the screen does not matter, there are no objects to interact with as its a Remote Window, “Remote Play”…

hi @sam71 try to use simply a “double click” activity within that window then you can pass whatever key you want to send.

Regards,
Ajay

Hi @Ajju This did not work either. It has nothing to do with the window being focused.

How can a piece of software like this not do such a simple task as holding a key down for X-amount of time???. I have other automation programs that do it easily…:unamused:

@loginerror @ovi

Hi @sam71

You can use two Type Into activities with something like this:
image

Then, you can add a delay between them to have the button pressed for a particular amount of time:
image

See attached xaml file:
testing button down press.xaml (5.5 KB)

@loginerror This doesn’t work with none special keys, A,B,C etc. “%[u(v)]” will not work.

Indeed.

Well, one other workaround would be to use AutoHotKey. You can get the activity by installing the UiPath.Script.Activities:

image

2 Likes