• 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: Two quick questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two quick questions


  • Subject: Re: Two quick questions
  • From: KOENIG Yvan <email@hidden>
  • Date: Fri, 23 Mar 2007 15:10:14 +0100


Le 23 mars 07 à 13:58:40, Ted Fitzpatrick a écrit :

Your first question:

tell application "Finder"

	version

end tell


This will return the Finder's version num which doesn't match the OS one.

With MacOS 10.4.9, it returns 10.4.7 which is not the wanted value.

You may use:

--[SCRIPT]
set OS to my NumToHex((system attribute "sysv"), 4)

tell application "Finder"
	display dialog "The current OS version is : " & OS
end tell

on NumToHex(theNumber, stringLength)
	set hexString to {}
	repeat with i from stringLength to 1 by -1
		set hexString to ((theNumber mod 16) as string) & hexString
		set theNumber to theNumber div 16
	end repeat
	return (hexString as string)
end NumToHex
--[/SCRIPT]

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:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Two quick questions (From: Bryan Lockwood <email@hidden>)
 >Re: Two quick questions (From: Ted Fitzpatrick <email@hidden>)

  • Prev by Date: A method of using Power PC OSXEN in an Intel environment
  • Next by Date: Re: Puzzling display dialog
  • Previous by thread: Re: Two quick questions
  • Next by thread: Re: Two quick questions
  • Index(es):
    • Date
    • Thread