0

For some time now, I have been using a keyboard shortcut to grab the selected text inside the address bar in Google Chrome and pass it to a Service (now called a Quick Action):

enter image description here

Sometime last week, I noticed that this workflow no longer receives input from the Chrome address bar. If I paste the address bar contents into Notes and select it, or select it inside Firefox and then press my keyboard shortcut the workflow still runs.

How can I access the contents of the Chrome address bar via my workflow?

  • Testing with Google Chrome version 73.0.3683.75 (Official Build) (64-bit) under macOS Mojave, getting current text (selected text) in the Google Address Bar is not allowed by Google Chrome as it does not even expose the macOS Mojave Automator Quick Action to the selected text of the URL in the Address Bar. You'll have to get it another way. For example, with AppleScript: tell application "Google Chrome" to set theURL to URL of active tab of front window – user3439894 Mar 19 at 18:48
1

This works for me using the latest version of macOS Mojave and Google Chrome.

Adding this following code to a run AppleScript action in your workflow, should work for you. The command copies the selected text to the clipboard

delay 1
tell application "System Events" to keystroke "c" using {command down}
delay .5
set theURL to the clipboard

enter image description here enter image description here enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .