• 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: Walter Ian Kaye <email@hidden>
  • Date: Thu, 6 May 2004 04:48:49 -0700

At 01:54a -0500 05/06/2004, Joseph Weaks didst inscribe upon an electronic papyrus:

On May 6, 2004, at 1:33 AM, Rob Jorgensen wrote:

'k, now I check the system version so I can use the speedier command. Speaking of which, turns out it's actually much faster to read and parse the XML file than to use do shell script/defaults.

Yep, I don't doubt that. I haven't done any testing but based on my overall experience and the feedback of other scripters, do shell script can be pretty sluggish (even when issuing simple shell commands that don't take a great deal of time to execute).

Any of you care to share your brilliantly economic handlers you've created to parse XML?

I simply used the 'offset' command:

set assv_key to "<key>CFBundleShortVersionString</key>"
tell app "Finder" to set p to (application file id "Arch") as alias as string
set p to p & "Contents:Info.plist"
set x to read file p
set o to offset of assv_key in x
set x to text (o + (length of assv_key)) thru -1 of x
set o_beg to offset of "<string>" in x
set o_end to offset of "</string>" in x
set v to text (o_beg + 8) thru (o_end - 1) of x


-boo
actually using 'list folder' and a repeat loop to handle Adobe Reader, et al
_______________________________________________
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.


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>)

  • Prev by Date: Re: Open files, do Photoshop action
  • Next by Date: Re: 'info for' braindead about .app packages
  • Previous by thread: Re: 'info for' braindead about .app packages
  • Next by thread: Re: 'info for' braindead about .app packages
  • Index(es):
    • Date
    • Thread