Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two quick questions




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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.