Re: Getting the version of a product
Re: Getting the version of a product
- Subject: Re: Getting the version of a product
- From: kai <email@hidden>
- Date: Mon, 28 Feb 2005 20:01:33 +0000
On Mon, 28 Feb 2005 11:34:37 -0500, "francois.houle" wrote:
I saw in the Finder's AS dictionary that you can check for the version
of a
product... I just can't figure out how to ge tit to work.
The line of the dictionary is:
product version Unicode text [r/o] -- the version of the product
(visible
at the top of the ³Get Info² window)
And its located under Class File : A File
As already noted, 'product version' seems to be very patchy - and it's
difficult to find anything other than empty strings being returned. The
'version' property seems more promising, although it may contain a tad
more text than you'd prefer. While the 'getNumOf' handler below is
rather rough and ready, it may help you get started on a method of
cleaning up things a bit:
on getNumOf(t)
repeat with w in t's words
if w's character 1 is in "0123456789" then return w's contents
end repeat
end getNumOf
set theFile to choose file of type {"APPL"}
tell application "Finder"
set vers to theFile's product version
if (count vers) is 0 then set vers to my getNumOf(get theFile's
version)
end tell
-- do something with vers
---
kai
_______________________________________________
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