• 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: 'info for' braindead about .app packages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'info for' braindead about .app packages


  • Subject: Re: 'info for' braindead about .app packages
  • From: Joseph Weaks <email@hidden>
  • Date: Sat, 8 May 2004 18:46:14 -0500

Clever, Walter.
I also used a simple script to view the info.plist for every app at the top level of the applications folder. It simply opened the first file which contained "plist"... rudimentary.

tell application "Finder"
set nameList to name of every application file in (path to applications folder)
set AppName to choose from list nameList with prompt "Select an application to open their info.plist"
set contentFolder to (path to applications folder as string) & AppName & ":Contents:"
set infoName to name of (first file in folder contentFolder whose name contains "plist")
open item (contentFolder & infoName)
end tell

Adding Walter's handler to be more thorough, I guess it'd be

tell application "Finder" to set nameList to name of every application file in (path to applications folder)
set AppName to choose from list nameList with prompt "Select an application to open their info.plist"
set infoPath to InfoPlistPath((path to applications folder as string) & AppName & ":")
tell application "Finder" to open item infoPath

Course, if you wanted to be thorough, I'd have to add recursive "gets" to nested apps.

Cheers,
Joe

On May 6, 2004, at 7:05 AM, Walter Ian Kaye wrote:
And here's my routine for getting the Info.plist, even if it's named oddly (such as Adobe Reader's "Info-macos.plist").

on InfoPlistPath(app_path)
local app_path, p, cfiles, f, f2
set p to app_path & "Contents:"
set cfiles to list folder p
set f2 to ""
ignoring case
repeat with f in cfiles
if f ends with ".plist" then
set f to f as item
if f is "Info.plist" then
exit repeat
else
if f contains "info" then copy f to f2
set f to ""
end if
else
set f to ""
end if
end repeat
end ignoring
if f is "" then set f to f2
p & f
end InfoPlistPath
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: 'info for' braindead about .app packages
      • From: Walter Ian Kaye <email@hidden>
References: 
 >'info for' braindead about .app packages (From: Walter Ian Kaye <email@hidden>)
 >Re: 'info for' braindead about .app packages (From: Christopher Nebel <email@hidden>)
 >Re: 'info for' braindead about .app packages (From: Walter Ian Kaye <email@hidden>)
 >Re: 'info for' braindead about .app packages (From: Rob Jorgensen <email@hidden>)
 >Re: 'info for' braindead about .app packages (From: Joseph Weaks <email@hidden>)
 >Re: 'info for' braindead about .app packages (From: Walter Ian Kaye <email@hidden>)

  • Prev by Date: Internet Connect Script
  • Next by Date: Re: Internet Connect Script
  • Previous by thread: Re: 'info for' braindead about .app packages
  • Next by thread: Re: 'info for' braindead about .app packages
  • Index(es):
    • Date
    • Thread