• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Best way to test for OS version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Prev by Date: Re: Quick way to check network connection
  • Next by Date: Re: exists ... index 0 returns true
  • Previous by thread: Re: Testing for OS version
  • Next by thread: Re: exists ... index 0 returns true
  • Index(es):
    • Date
    • Thread