• 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: 10.4.9 versus 10.4.10
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: 10.4.9 versus 10.4.10
      • From: Paul Berkowitz <email@hidden>
    • InDesign CS2, XML, and graphics
      • From: "Houston, Brad" <email@hidden>
  • Prev by Date: Re: PlugIns or Plug-ins
  • Next by Date: Re: Batch Renaming Slower in 10.5.2 (Build 9C31)
  • Previous by thread: Re: 10.4.9 versus 10.4.10
  • Next by thread: InDesign CS2, XML, and graphics
  • Index(es):
    • Date
    • Thread