• 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: can't get version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't get version


  • Subject: Re: can't get version
  • From: Rob Jorgensen <email@hidden>
  • Date: Fri, 17 Jun 2005 09:43:05 -0400

At 7:09 AM -0600 6/17/05, Robert Poland wrote:
Hi,

I can't get the version with Tiger.

tell application "Finder" to set x to long version
tell application "Finder" to set x to short version
tell application "Finder" to set x to system version
set x to system version

All produce errors.

What I'm looking for is a way to tell if the System is Tiger.

Any cure?

I've forgotten where it came from (apologies to the author who should be credited) but the following appears to work in Tiger, as it did in Panther and possibly Jaguar.


 set {name_, vers_, build_} to getVersionInfo()
 display dialog name_ & " " & vers_ & " " & "(" & build_ & ")"

 on getVersionInfo()
  set raw_ to paragraphs of (do shell script "sw_vers")
  set oldTID to text item delimiters
  set text item delimiters to (":" & tab)
  set OSname to last text item of item 1 of raw_
  set OSvers to last text item of item 2 of raw_
  set OSbuild to last text item of item 3 of raw_
  set text item delimiters to oldTID
  return {OSname, OSvers, OSbuild}
 end getVersionInfo

-- Rob
_______________________________________________
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


References: 
 >can't get version (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: can't get version
  • Next by Date: Re: can't get version
  • Previous by thread: Re: can't get version
  • Next by thread: Re: can't get version
  • Index(es):
    • Date
    • Thread