I'm new to KM and tried searching the archives but did not find a similar macro. When I highlight text, I want to press a trigger that will (1) copy the text, (2) paste the text into the Chrome URL bar, with quotation marks around the text, then (3) hit enter to execute the search. For example, if I'm reading an article on the web about John Smith, I'll use the mouse to select the phrase "John Smith" in the article, press the function key (say, for example, F1), then my Chrome window will be activated with the Google search results for "John Smith" (with quotation marks around it).
The macro does not have to do all of those steps, but the more time-saving I can make it, the better. Thanks!
You might want to filter your Cmd-click-release triggers -- for example, what does the above do if you are Cmd-clicking to select non-contiguous files in the Finder or an "Open" dialog?
Of course, if you don't use Cmd-click for anything else you'll be fine!
I like the idea! As @Nige_S says, it might not be the best key combo, as ⌘-click opens a link in a new tab in many browsers. Conflict with Finder etc aren't an issue if you put the macro in an app-specific group.
Just for fun, here's a version that only performs the search if something was copied. If you ⌘-click without highlighting, it does whatever ⌘-click usually does.
Yeah sometimes it's hard to know whether the forum has recognised it as a direct reply. For that reason, I sometimes @ people as well to make sure they get notified.
That wasn't really my concern. It's more that you are espousing a wide-ranging change to a "standard" action. You can Cmd-click in the Finder to also select a file that isn't "next to" the currently selected one(s), Cmd-click on the Photoshop "New Channel" icon makes a new spot channel, in Visual Studio it takes you to a class/function definition, etc.
None of that may matter to you, but IMO it's worth noting when it's suggested to other people. @noisneil's tweak is a nice addition, and restricting the macro to Chrome- (or browser-)only (which seems to be OP's requirement) will also limit the conflicts -- given that, I'm probably worrying unduly!