I’m looking to have my app check what the OS version is on the host computer when launching. Then I’d like to determine if they’re running 10.3 or later…if not…the app will notify them that they need to update before running and then quit the app…otherwise the app will launch normally…any pointers? I’ve been looking all day and haven’t really found a great solution…what handler should I be placing it in?
Here’s some version checking code that was lifted from one of Apple’s scripts. I’m not a Studio user so I can’t say where you should use the code.
set the hexData to system attribute "sysv"
set hexString to {}
repeat 4 times
set hexString to ((hexData mod 16) as string) & hexString
set hexData to hexData div 16
end repeat
set the OS_version to the hexString as string
if the OS_version is less than "1030" then
display dialog "This script requires the installation of " & ¬
"Mac OS X 10.3 or higher." buttons {"Cancel"} ¬
default button 1 with icon 2
end if
– Rob