How do I Mimic Holding Control Key and Clicking to copy highlighted text?

I am 'scraping' data from potential candidates from a website.
ONLY with the help of this awesome forum and the SUPER geniuses that are so generous with their Blessings..... =)
On the Betterteam site, applicants responses / resumes are available to us.
Most of the time the resume is 'embedded in the site, so the usual copy all, does not get that information.
I have to literally highlight the info I want in the resume, usually, simply the name address phone number and email. And then I have to hold the control key, click the mouse in order for the 'contextual'? menu to come up for me to select copy. I then have the data on the clipboard and can move forward.
Is there a keyboardie, =) maestro way of getting at that data more eloquently?
Much appreciated in advance.
OH< and Happy Thanksgiving to you and yours, SO much to be grateful for...... !!

I'm not one of the real experts here, but I think you can use the KM Mouse Click action with a CTRL modifier to get the menu to come up and then I think you can send a key with the Keyboard Maestro Type a Keystroke action to select the menu item that you want, then you use the same action to press the Enter key. I think I've done something like this before, but I'll leave it to you to try/confirm.

Maybe I should give thanks to KM or its creator during a thanksgiving dinner someday.

thanx @Sleepy right, ... the only issue is that it has to click on the highlighted text in order for it to work. I know there's a may to move the mouse until the color at xxx pixel is a certain color but that's a bit unworkable for numerous computers with different highlight colors..... But yeah, I appreciate your response.... giving thanks.... =)

I missed the part about "click on highlighted text." You may be able to do that with the Mouse Click on Found Image action using the edge colour of the highlighted text. I'll bet I can make that work.

But if you are selecting the text with your mouse, then just leave the mouse over the selected text and you can click on the current location of the mouse. That solution couldn't be too annoying.

Appreciate your response, yes, of course, it can be made to 'work' , the question is how stable / user proof and how seamless.

The highlighted text is always a different size/look so found image will not work.

And instructing users to highlight the text, then leave the mouse over the highlighted text then trigger this macro - is not feasible.

It's ok the way it is, I'm just always looking for a better / more stable way.

I can of course have them control click on the text and select copy..... done...

But I'm OCD and just snooping around.

A lot of times the thing I'm snooping on ends up teaching me something I can use somewhere else.

Thanx

I don't need you to accept my solution, but I assure you it will work most of the time when done correctly, regardless of whether the highlighted text has a different size/look. I have experience doing this exact sort of thing with some tricky algorithms to account for erroneous detections and with the right sorcery it will work.

What? Bro, it’s all good…
It’s not about accepting your solution…
Cheers.

Oh. I'm sorry if my words were offensive. I just use bold letters occasionally to highlight key ideas, not to shout. I was motivated simply to give you a solution, and I know my solution works because I've done it before.

2 Likes

Hey @troy,

Why?

Does C not work?

Does the Keyboard Maestro Copy action not work?

This is in a web browser? Which one? If Safari, Google Chrome, or one of their derivatives you can run the following JavaScript to acquire selected text:

window.getSelection().toString()

In an Execute a JavaScript in Front Browser action.

-Chris

Hey @ccstone,

If I 'select all' and copy, I only get the top part of the page as shown in the first screenshot. I do use part of that data though.

The second part is that I have to highlight the 'embedded?' text part of the resume and control click on it to select copy, only then am I able to 'scrape' it into where I need it, clipboard then KM variables etc etc.

I did try the

window.getSelection().toString()

After I selected the 'internal/embedded/ text to no avail. - the saved variable is blank.

Here's what is highlighted when I choose the menu select all.

Then I have to click/highlight the 'internal' text, right click and select copy to be able to get it to the clipboard.