Use of 'Copy Selected Text' activity

Hi There,

I am having an hard time in understanding the use of the activity ‘Copy Selected Text’. I thought it would copy the text data that would have been selected in the screen which would then be taken as a string to a variable as output. But it doesn’t seems to be working in that way. Need suggestions.

Just FYI, I am selecting the text of command prompt and i want it to be copied as an output.

Thanks,
Rammohan B.

1 Like

@Rammohan91, Attaching a sample for you,

Scrape Cmd.xaml (7.0 KB)

Regards ,
Dom :slight_smile:

1 Like

Hey @Dominic, Thanks for the reply.

That’s exactly the way i was trying to use ‘Copy Selected Text’ activity. As from your attached workflow, sending ‘ctrl+a’ hotkey was not selecting the text under the command prompt. However i figured out another way to select by sending ‘alt+space’, ‘e’ & ‘s’ as hotkey.

Coming back to copy the selected text using ‘Copy Selected Text’ activity, below error is thrown,

Thanks & Regards,
Rammohan B.

@Rammohan91, Sorry that it doesn’t work. From my end I have tested and working as expected. Getting the output in message box as well.

Just to know it, did u make any changes in the code?

Regards,
Dom :slight_smile:

@Dominic
Strange. Initially i didn’t made any change in the workflow which you send, but the activity send hotkey with ‘ctrl+a’ is actually being typed in the command prompt instead of performing select all.

As i said since it was failing, i replaced that activity with few send hotkey activities which sends ‘Alt+Space’, ‘e’ & ‘s’ & ‘enter’ so that it actually selects all the contents from the command prompt. Till here everything looks working fine.

After that i added a ‘Copy selected text’ activity to copy the content that has been selected in the command prompt and that’s where i am getting that error which i attached in the previous reply. Attached my workflow as well just in case it helps.
Main.xaml (14.7 KB)

Thanks & Regards,
Rammohan B.

@Rammohan91,

This is fine.

Its not required. As the process of copying the selected text will be done by Copy Selected Text activity. So u can disable the activity and run once again.

+++++++++++++++++++++++++++++++++++++++++++++++++++++++

Also make sure that when you use CTRL+a in send hot key, set the following properties, [Tested &Working]

Regards,
Dom :slight_smile:

Hi

I am having the same issue, I put everything as you do but I get that error :frowning:

Hi again

I found a solution using get from clipboard instead of copy selected text. So I first do shift+end, then ctrl+c and finally get from clipboard (I get a variable :slight_smile: )

1 Like

That’s exactly what i did. :slight_smile:

Thanks,
Rammohan B.

Its not working for me
but same is working for my collegue

I was using this activity in Excel with select range activity and works correctly.

Can you please tell how did you do this for excel. I tried using select range (i select only few cells) and then used copy selected text. Instead of copying only the specific cells that are selected, its copying the entire sheet. Please help