Created
February 4, 2012 19:36
-
-
Save neurobashing/1739659 to your computer and use it in GitHub Desktop.
get selected text in safari
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Safari" | |
-- set tehWin to current tab of window 1 | |
set selectedText to (do JavaScript "(''+getSelection())" in document 1) | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment