Skip to content

Instantly share code, notes, and snippets.

@langolf
Created May 17, 2019 15:07
Show Gist options
  • Save langolf/1adbec15c9a9a32f89f7ce9008a972ee to your computer and use it in GitHub Desktop.
Save langolf/1adbec15c9a9a32f89f7ce9008a972ee to your computer and use it in GitHub Desktop.
Get vscode title
global frontApp, frontAppName, windowTitle
set windowTitle to ""
tell application "System Events"
set frontApp to application process "Code"
set frontAppName to name of frontApp
tell process frontAppName
tell (1st window whose value of attribute "AXMain" is true)
set windowTitle to value of attribute "AXTitle"
end tell
end tell
end tell
return {windowTitle}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment