With Yosemite, can no longer get selected text of Google Chrome page
With Yosemite, can no longer get selected text of Google Chrome page
- Subject: With Yosemite, can no longer get selected text of Google Chrome page
- From: Charles Arthur <email@hidden>
- Date: Sun, 26 Oct 2014 18:15:56 +0000
Greetings ASU folk (after a very long gap)
For years, I’ve had a script - its essential element provided kindly by someone here - which let me grab the selection of a Google Chrome page. (I would invoke it from Keyboard Maestro, but we’ll get to that.)
In Yosemite, it doesn’t work. Not in Script Editor.
Yes, I have enabled Script Editor and SystemUIServer in System Prefs -> Accessibility.
The script goes, in part
++
tell application "Google Chrome"
set theselect to (selectedText of me from "Google Chrome")
log "theselect: " & theselect
end tell
++
In Mavericks (and almost all earlier versions), this gives the selected text of the active tab.
In Yosemite, this gives “missing value”.
Chrome’s library says it has a “copy selection” command -
++
copy selection v : Copy text.
copy selection specifier : The tab to execute the command in.
++
Tried it. Doesn’t work. Neither “copy selection of active tab” nor “copy selection of active tab of front window” yields anything. (One errors, one returns no result.)
In my desperation, I’ve even tried Javascript. Also doesn’t work. (Prefer not to use Javascript tbh.)
So - how can I copy and paste selection in a Google Chrome window? And a Safari window for good measure. TIA.
best
Charles
On Twitter: http://twitter.com/charlesarthur
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden