Created
July 23, 2014 16:34
-
-
Save bachya/694ff8a774f805882218 to your computer and use it in GitHub Desktop.
Updated Markdown Links in TextExpander
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 "System Events" | |
set numSafari to count (every process whose name is "Safari") | |
set numChrome to count (every process whose name is "Google Chrome") | |
end tell | |
if numSafari > 0 then | |
tell application "Safari" | |
set fURL to URL of front document | |
set fTitle to name of front document | |
end tell | |
else | |
if numChrome > 0 then | |
tell application "Google Chrome" | |
set frontIndex to active tab index of front window | |
set fURL to URL of tab frontIndex of front window | |
set fTitle to title of tab frontIndex of front window | |
end tell | |
end if | |
end if | |
get "[" & fTitle & "](" & fURL & ")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment