Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
tell application "System Events"
set frontApp to name of first application process whose frontmost is true
set activeURL to ""
if frontApp is "Google Chrome" then
tell application "Google Chrome"
set normalWindows to (windows whose mode is not "incognito")
if length of normalWindows is greater than 0 then
set activeURL to (get URL of active tab of (first item of normalWindows))
end if
end tell
end if
end tell
frontApp & "," & (activeURL) as String
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment