Re: Mac OS Version Sniffer
Re: Mac OS Version Sniffer
- Subject: Re: Mac OS Version Sniffer
- From: Rob Jorgensen <email@hidden>
- Date: Thu, 17 Oct 2002 16:35:05 -0400
At 2:52 PM -0500 10/17/02, Ken Goff wrote:
At 11:00 AM -0700 10/17/02, Bill Cheeseman at email@hidden wrote:
> Is there an AppleScript that is compatible with both Mac OS 9 and Mac
OS X and that can determine which version of the Mac OS is running?
When you say "which version," do you mean merely distinguishing between 9
and X, or getting the actual version number? Your question is ambiguous.
Please excuse my ambiguity. Yes, I mean to distinguish between 9 and
X. To clarify further, I am looking for an AppleScript that can
determine whether the Macintosh boot OS is Mac OS 9 or Mac OS X.
As well as determining the boot OS (9 or X), this same AppleScript
must run under both Mac OS 9 and Mac OS X, without error messages.
The script needs to be compatible with both Mac OS 9 and X. When the
script is run, it can identify the boot OS as "X" or as "9", rather
than a specific version such as "9.0.4" or "10.1.5", etc.
From there I want to add the AppleScript equivalent of the following:
case boot OS is "X"
-do something
case boot OS is "9"
-do something else
default case
-do something if not "9" and if not "X"
--
This is a rather dirty method that doesn't determine the version of
the OS but maybe it'll be sufficient.
try
path to control panels -- not present in OS X
-- do OS 9 stuff
on error number -43 -- error produced when run in OS X
-- do OS X stuff
end try
--
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.