Re: 10.4.9 versus 10.4.10
Re: 10.4.9 versus 10.4.10
- Subject: Re: 10.4.9 versus 10.4.10
- From: "Nigel Garvey" <email@hidden>
- Date: Mon, 17 Mar 2008 23:10:45 +0000
KOENIG Yvan wrote on Mon, 17 Mar 2008 15:48:02 +0100:
>It seems that the code offered by Paul Berkowitz (slightly modified
>here)
>
>try
> set v to ((system attribute "sys1") as string) & "." & (system
>attribute "sys2") & "." & (system attribute "sys3")
> --> 10.4.11
>on error
> set v0 to system attribute "sysv"
> set {v1, v0} to {v0 div (16 ^ 3), v0 mod (16 ^ 3)}
> set {v2, v0} to {v0 div (16 ^ 2), v0 mod (16 ^ 2)}
> set {v3, v4} to {v0 div (16 ^ 1), v0 mod (16 ^ 1)}
> set v to (v1 as string) & v2 & "." & v3 & "." & v4
> --> 10.3.9
>end try
>
>respond to every case.
Not quite, I'm afraid. The new attribute values don't error with AS 1.9.1
(OS 10.2.8). They return empty strings. They do, however, error with AS
1.8.3 (OS 9.2.2). :)
Maybe this would do it?
tell application "Finder"
try
set v to (system attribute "sys1")
if (v's class is integer) then
set v to (v as string) & "." & (system attribute "sys2") & "." &
(system attribute "sys3")
else
error
end if
on error
set v to (system attribute "sysv")
set v to ((v div 4096 * 10 + v mod 4096 div 256) as string) & "." &
v mod 256 div 16 & "." & v mod 16
end try
end tell
NG
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden