How to copy hot key selected value to clipboard using insert clipboard activity

Hi Allen,

I automating windows legacy application these days. As shown in below figure I want to copy the selected text value to clipboard.
160

the only way to access this text box is use hot keys.
I pass {Ctrl+A} by using type text activity to select the value. Then how can I use insert clipboard activity to copy it to clipboard. what would be the value of this text column in insert clipboard activity.


I tried to pass {Ctrl+C} to copy it to clipboard but it was not successful.
Could you please advice me.
Thank you.

Regards,
Pramodh Ramanayaka.

You then need to send Ctrl+C to copy
You can then use the activity “Copy clipboard” to read the value from clipboard into a variable

to copy value you can use get text or run ocr on element if this is not working because any issue than only you should click on text box first than press Ctrl+a than delay of 1 sec press ctrl+c

Hi yashshah,

Thanks for the help.
I try to pass {Ctrl+C} but I am getting below error in my logs.

<?xml version="1.0" encoding="utf-16"?>__ReferenceID0

[17:10:08.650][Output] <?xml version="1.0" encoding="utf-16"?><ClipboardData.Data><scg:List x:TypeArguments=“x:Object” Capacity=“1”><p:Delay x:Name=“__ReferenceID0” Duration=“00:00:01” VirtualizedContainerService.HintSize=“264,22” /></scg:List></ClipboardData.Data><ClipboardData.Metadata><scg:List x:TypeArguments=“x:Object” Capacity=“4”><scg:List x:TypeArguments=“x:Object” Capacity=“4”><x:Reference>__ReferenceID0</x:Reference></scg:List></scg:List></ClipboardData.Metadata>
[17:08:36.546][Output] 345.60

possible to share screenshot of code?

yes yashshah.

Could you please check what is the wrong with it.
162


163

value in type text is not correct: correct value you need to put is “{LCONTROL down}c{LCONTROL up}”.
press record button and press ctrl+c in keyboard you will get this value

1 Like

Hi Yashshah,

Thank you so much.
That was the issue. Now its working fine.

Regards,
Pramodh Ramanayaka

1 Like

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