Re: Finder Scripting: Looking inside packages
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.