• 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: Finder Scripting: Looking inside packages
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder Scripting: Looking inside packages


  • Subject: Re: Finder Scripting: Looking inside packages
  • From: Rob Jorgensen <email@hidden>
  • Date: Tue, 29 Jul 2003 10:26:09 -0400

At 3:57 PM +0200 7/29/03, Sascha Kratky wrote:
Hi,

the AppleScript interface of the OS X Finder seems to treat bundled applications as "application files".
E.g. the AppleScript

tell application "Finder"
get class of item "Mac OS X:Applications:Safari.app:"
end tell

returns "application file"

There seems to be no way to make the Finder treat an application bundle as a regular folder under AppleScript. This is preferable if you want to use AppleScript to automatically build the folder hierarchy of an application bundle or to manipulate the files in the application bundle. When trying to access the contents of the application bundle however the Finder returns the error "Can't make or move that element into that container". Has anyone succeeded in doing this?

I use the Finder to move files and folders into and out of packages with no problem. What happens when you run this (assuming that permissions allow you to muck around within the Applications folder):

tell application "Finder"
activate
set contents_ to (first item of alias "Mac OS X:Applications:Safari.app:") as alias
set nf to make new folder at contents_ with properties {name:"new folder from Rob"}
reveal nf
delay 5
move nf to desktop
end tell

-- Rob
_______________________________________________
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: 
 >Finder Scripting: Looking inside packages (From: Sascha Kratky <email@hidden>)

  • Prev by Date: Re: Finder Scripting: Looking inside packages
  • Next by Date: Folder Actions
  • Previous by thread: Re: Finder Scripting: Looking inside packages
  • Next by thread: Folder Actions
  • Index(es):
    • Date
    • Thread