Holding Down Ctrl in background

I have done extensive research on this question and have not found anything that works. I am trying to select multiple items from a list on the web and can achieve this by holding down ctrl and clickingeach item. This needs to run on an unattended bot, here is what i have tried:

  1. Attempt: Click with key modifier set to KeyModifiers.Ctrl and simulate click
    Result: Error - RemoteException wrapping UiPath.Core.ElementOperationException: Timeout reached. —> RemoteException wrapping

  2. Attempt: Click with key modifier set to KeyModifiers.Ctrl and send window messages
    Result: No Error - Nothing is clicked at all

  3. Attempt: Type into activity with [d(lctrl)] as text before clicking items and Type into activity with [u(lctrl)] as text after clicking items with simulate type set for both type activities
    Result: Items are clicked one by one, ctrl key is not held down

  4. Attempt: Type into activity with [d(lctrl)] as text before clicking items and Type into activity with [u(lctrl)] as text after clicking items with send window messages set for both type activities
    Result: Same as above…Items are clicked one by one, ctrl key is not held down

All results were observed after the bot ran unattended, i logged into the VM that the bot was running on and checked to see if items were selected/ if the query was submitted with the items selected/

I have spent quite some time trying to figure this out if anyone has any insight on this it would be greatly appreciated!

@zspilman
what we sometimes encountered is that unattended is mixed up with working in background.

So give a try on click activity without simulate click or send window message but along with keymodifier.ctrl.

If its not working on the first run do it with debugging step by step (sometimes bot is faster the UI)

Still there a many more options for an alternate solution:

  • find children and do clicking relevant items
  • nav ups/down and enter space for selection

but first try testing it without simulate… / or send…

Hi @zspilman

You can try using Type into activity whit the following parameters:
Target: First element that you want to select
Text: [d(shift)] [k(down)][k(down)][u(shift)]
Fell free to add the correct amount of down keys, it depends of how many items you want to select.

Regards,

Andres

Hi @AndresTarazona,

Unfortunately the site i am working with does not respond to navigating up and down the list and holding sown shift or ctrl when on an item that needs to be selected. Items are only selected with click events. There should be a way to have the ctrl btn held down and then i can just click the appropriate items. I have been playing around with AutoHotKeys and powershell to try and simulate the ctrl key downpress but have not had any luck.

Hi @ppr,

Sorry for any confusion. This bot needs to run as an unattended bot from orchestrator, so not using simulate click or send window messages does not work and the activity times out.

Hi @zspilman

Windows messages are used to send messages between desktop applications, I suppose that you are sending orders to a Web application, so that doesn’t apply.

Simulate clicks works on unattended and attended executions. It should not be a problem.

The type activity that I mention above needs to be used unchecking simulate type. Just try, and comment if it works or not.

Regards,

Andres

let me reformulate my statement, maybe it becomes more clear:
we do run a lot of unnattended bots and get triggered by Orchestrator Scheduler. All this executed automation proccesse has implemented click activities without using simulate click or send windows message.

If we face click issues while development phase we are analysing the root cause. In the majority of cases the bot and the application were not in sync and the clicks were not done properly. But with different mechanism and techniques we bring the sync back and click werde excuted in a reliable sequence.

Hi @AndresTarazona,

The site i am working with only selects items with click activities, even if manually enter these key stokes on my keyboard without any bots it will not work. It is not a list like a list of files in file explorer.

Hi @ppr,

When i run this bot in studio with simulate click and send window messages not selected, the bot works fine. It errors when i run it from orchestrator.

Thanks,
Zev

All this executed automation proccesse has implemented click activities without using simulate click or send windows message.

No Simulate, No Send Windows Message. Only click within an app-bot synchronized flow

sorry i did not word my comment correctly, when running the bot in studio, simulate click is NOT selected and sendwindowsmessages is also NOT selected and it works fine. when i publish that package to orchestrator it does not work as an unattended bot.