Skip to content

Instantly share code, notes, and snippets.

@ideamonk
Created August 7, 2011 09:42
Show Gist options
  • Save ideamonk/1130247 to your computer and use it in GitHub Desktop.
Save ideamonk/1130247 to your computer and use it in GitHub Desktop.
#!/usr/bin/osascript
tell application "System Events"
set frontApp to name of first application process whose frontmost is true
end tell
tell application frontApp
if the (count of windows) is not 0 then
set window_name to name of front window
end if
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment