How can I find which version of OSX is installed on my Mac by using AppleScript? I want to install an app programatically and run different pkg files based on the version.
Here is how to get OSX version in AppleScript, using built-in functions:
set sysinfo to system info set osver to system version of sysinfo
On OS X Mavericks the result is "10.9".
One-liner: set osver to system version of (system info)
set osver to system version of (system info)