• 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: Getting the version of a product
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting the version of a product


  • Subject: Re: Getting the version of a product
  • From: yvan-koenig <email@hidden>
  • Date: Mon, 7 Mar 2005 21:46:08 +0100


Le 28 févr. 2005 , à 18:29, Adam Wuellner a écrit :

tell application "Finder"
	set theFile to file (choose file)
	get theFile's product version
end tell

NB: I have not seen a file for which that property's value is other than "".

It's perhaps because with your code you get the property of the package itself (in fact it is a folder).
If you reach the true app file, you will get the correct value.


tell application "Finder"
set theFile to file (choose file)
set nf to name of theFile (* grab the package's name *)
set nf to text 1 thru -5 of nf (* remove the extension *)
set theTrueFile to "" & theFile & ":Contents:MacOS:" & nf (* build the complete path *)
get (theTrueFile as alias)'s product version
end tell


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: This email sent to email@hidden
  • Prev by Date: Re: question about iPhoto scripting
  • Next by Date: Re: Illustrator Pantones
  • Previous by thread: Re: Illustrator Pantones
  • Next by thread: one-line review of "Applescript: The Missing Manual"
  • Index(es):
    • Date
    • Thread