Last active
August 29, 2015 14:06
-
-
Save bachya/1f1f8c7329f9a0002cd5 to your computer and use it in GitHub Desktop.
For use in TextExpander or aText. Grabs the current tab in Chrome and returns a Markdown link with the correct URL and a prompt to enter the link text.
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
-- Before we do anything, see if there's even an instance | |
-- of Chrome running. | |
tell application "System Events" | |
set numChrome to count (every process whose name is "Google Chrome") | |
end tell | |
if numChrome > 0 then | |
tell application "Google Chrome" | |
set frontIndex to active tab index of front window | |
set theUrl to URL of tab frontIndex of front window | |
end tell | |
end if | |
get "[【|】](" & theUrl & ")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment