11
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)
I'm not too familiar with AppleScript, but AFAIK you can get some info about versions from the shell with the sw_vers command. For example:
Macintosh:~ udekel$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.5.6
BuildVersion: 9G55
If you can read and parse that from appleScript, that may be a solution, though I'm sure there has to be something more elegant.