Re: Best way to test for OS version
Re: Best way to test for OS version
- Subject: Re: Best way to test for OS version
- From: John Baltutis <email@hidden>
- Date: Mon, 19 Dec 2005 23:41:41 -0800
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