Re: OS version?
Re: OS version?
- Subject: Re: OS version?
- From: Rob Jorgensen <email@hidden>
- Date: Wed, 14 May 2003 13:32:10 -0400
At 6:58 PM +0200 5/14/03, Emmanuel wrote:
How do I get the version (10.2.6) of my OS?
Finder's version returns "10.2.1", and Finder's product version returns "".
This poached code (likely from someone on this list) seems to work nicely:
set foo to do shell script "sw_vers"
set vers to paragraph 2 of foo
set oldDelims to AppleScript's text item delimiters
try
set AppleScript's text item delimiters to {":"}
set vNum to last text item of vers
set AppleScript's text item delimiters to oldDelims
on error
set AppleScript's text item delimiters to oldDelims
end try
set oldDelims to AppleScript's text item delimiters
try
set AppleScript's text item delimiters to {" "}
set vNum to last text item of vers
set AppleScript's text item delimiters to oldDelims
on error
set AppleScript's text item delimiters to oldDelims
end try
display dialog vNum
--
Rob Jorgensen
Ohio, USA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
References: | |
| >OS version? (From: Emmanuel <email@hidden>) |