Created
October 13, 2022 11:31
-
-
Save alexkaessner/10d2070f0a556ba128747e33c3b11fc3 to your computer and use it in GitHub Desktop.
AppleScript to retrieve the version and build number of the frontmost/open app.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Events" | |
set activeApp to first application process whose frontmost is true | |
set appName to name of activeApp | |
set plistFile to (path of alias of file of activeApp & "Info.plist") as text | |
tell property list file plistFile | |
set appVersion to value of property list item "CFBundleShortVersionString" | |
set appBuild to value of property list item "CFBundleVersion" | |
end tell | |
end tell | |
set appInfo to appName & " " & appVersion & " (" & appBuild & ")" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment