Skip to content

Instantly share code, notes, and snippets.

@kristianfreeman
Created August 30, 2012 04:35
Show Gist options
  • Save kristianfreeman/3522360 to your computer and use it in GitHub Desktop.
Save kristianfreeman/3522360 to your computer and use it in GitHub Desktop.
Applescript TE snippet for automation of Safari link pulling
set linkText to "%fill:text%"

try
    tell application "Safari"
        set currentURL to URL of current tab of front window
    end tell
    set link to "[" & linkText & "](" & currentURL & ") "
    return link
on error
    "None"
end try
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment