Get the installed Safari version using AppleScript

2019-06-14 06:58发布

问题:

How can I check the installed safari version on Mac? I need to provide temporary fix for Safari as my app didn't work on safari 5.0.6 and 5.1. So how can I detect these 2 version of safari...

i can find its version using webkit but based on this site: http://en.wikipedia.org/wiki/Safari_version_history

Safari 5.0.6 has the similar webkit as the previos version...

回答1:

If Safari is running this AppleScript will get the version:

tell application "Safari"
    set safariVersion to version
end tell


回答2:

You can do this even if Safari isn't running...

get version of application "Safari"


回答3:

You can read the version out of /Applications/Safari.app/Contents/version.plist.