|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
On 12/19/05, Brett Conlon <email@hidden> wrote: > > What is the best way for a script to test for the version of OSX a user is > running? > > I'm setting up UI scripting for printing and there are some minor changes > from 10.3.9 to 10.4 and I'd like to include an OSXTest handler then IF > statements to act accordingly? This works well in Tiger and AFAIK, should work in Panther (not tested), itreturns both the OS version and the build number. Modify as necessary. try setvers to (do shell script "defaults read /System/Library/CoreServices/SystemVersion ProductUserVisibleVersion") end try try setbuild to (do shell script "defaults read /System/Library/CoreServices/SystemVersion ProductBuildVersion") end try tell application "Finder" display dialog "This computer is running" & return &return & "MacOS X version: " & vers & return &" Build Version: " & build buttons "OK" default button 1 end tell _______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.