• 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: Determining Binary Type
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining Binary Type


  • Subject: Re: Determining Binary Type
  • From: Christopher Nebel <email@hidden>
  • Date: Fri, 29 Jan 2010 12:56:16 -0800

On Jan 26, 2010, at 8:26 AM, Luther Fuller wrote:

On Jan 26, 2010, at 10:11 AM, Marconi wrote:

At 9:51 AM -0600 1/26/10, Luther Fuller sent email regarding Re: Determining Binary Type:
On Jan 26, 2010, at 9:32 AM, Marconi wrote:
Given a path like: "/volumes/SomeVol/System/Library/CoreServices/Finder.app/Contents/ Mac OS/Finder" how do I find out whether the file 'Finder' is PPC, Intel or Universal?

Use this ...

tell application "Finder" to kind of aliasToAppl

I get an error:

tell application "Finder" to kind of "/volumes/Bart/System/Library/CoreServices/Finder.app/Contents/ Mac OS/Finder"

Can't get kind of "/volumes/Bart/System/Library/CoreServices/Finder.app/Contents/ Mac OS/Finder".

In my example, 'aliasToAppl' must be an alias, not a posix path.
You need to change the posix path to an alias, then it will work.
For example ...

tell application "Finder" to kind of posix file "/volumes/..."

You can also use ...

alias "OS_X:System:Library:CoreServices:Finder.app:Contents:MacOS:Finder"
tell application "Finder" to kind of the result --> "Unix Executable File (Intel)"

...and if you're starting from Terminal in the first place, consider the file(1) command:

% file /System/Library/CoreServices/Finder.app/Contents/MacOS/Finder 
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder: Mach-O universal binary with 2 architectures
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder (for architecture x86_64): Mach-O 64-bit executable x86_64
/System/Library/CoreServices/Finder.app/Contents/MacOS/Finder (for architecture i386): Mach-O executable i386


--Chris Nebel
AppleScript Engineering

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Determining Binary Type (From: Marconi <email@hidden>)
 >Re: Determining Binary Type (From: Luther Fuller <email@hidden>)
 >Re: Determining Binary Type (From: Marconi <email@hidden>)
 >Re: Determining Binary Type (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: How to test if a Mail folder exists?
  • Next by Date: Re: Open a linked jpeg in Photoshop instead of the browser itself
  • Previous by thread: Re: Determining Binary Type
  • Next by thread: Subject: Fwd: [mac-dev-jobs] Need Mac Programmer for Text extraction app
  • Index(es):
    • Date
    • Thread