Skip to content

Instantly share code, notes, and snippets.

@ideamonk
Created August 7, 2011 09:42
Show Gist options
  • Save ideamonk/1130248 to your computer and use it in GitHub Desktop.
Save ideamonk/1130248 to your computer and use it in GitHub Desktop.
#!/usr/bin/osascript
if appIsRunning("Google Chrome") then
tell application "Google Chrome"
get URL of active tab of window 1
end tell
end if
on appIsRunning(appName)
tell application "System Events" to (name of processes) contains appName
end appIsRunning
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment