Re: X, Classic, or 9?
Re: X, Classic, or 9?
- Subject: Re: X, Classic, or 9?
- From: yvan-koenig <email@hidden>
- Date: Mon, 17 Jan 2005 15:37:29 +0100
Le 17 janv. 2005 , à 15:07, Nigel Garvey a écrit :
tell application "Finder" to set FinderSysv to («event fndrgstl»
"sysv")
if FinderSysv < 4096 then
-- Some version of Mac OS prior to OS X
else if FinderSysv > («event fndrgstl» "sysv") then
-- Classic
else
-- OS X
end if
Making a synthesis of my original responce and the Nigel one, I built:
set aa to my quelOS()
display dialog "" & aa
on quelOS()
try
--tell application "Finder" to set FinderSysv to («event fndrgstl»
"sysv")
tell application "Finder" to set FinderSysv to (system attribute
"sysv")
-- set hex_Data to «event fndrgstl» "sysv"
set hex_Data to system attribute "sysv"
set hexData to hex_Data
set hexString to {}
repeat 4 times
set hexString to ((hexData mod 16) as string) & hexString
set hexData to hexData div 16
end repeat
set OS_version to hexString as string
on error
set OS_version to "0000"
(* retournera "0000" si "system attribute" n'est pas reconnu *)
end try
if (OS_version = "0922") and (hex_Data < FinderSysv) then set
OS_version to "09Cl"
return OS_version
end quelOS
You will get:
"0000" for very old systems
"0922" for 922 "native"
"09Cl" for Classic
"1..." for Mac OS X ( "1037" with the last available one)
Yvan KOENIG
_______________________________________________
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