Re: Ultra Newbie question
Re: Ultra Newbie question
- Subject: Re: Ultra Newbie question
- From: Steve Mills <email@hidden>
- Date: Mon, 1 Dec 2003 16:05:00 -0600
On Dec 1, 2003, at 15:32, Lawrence Conley wrote:
tell application "Finder"
activate
make new folder at folder "Desktop" of folder "larry" of folder
"Users"
of startup disk with properties {name:"untitled folder"}
set name of folder "untitled folder" of folder "Desktop" of folder
"larry" of folder "Users" of startup disk to "My Amazing New Folder"
end tell
Check out the "path to" verb in the Standard Additions dictionary. It
returns a pathname. You can use that pathname to refer to a Finder
"folder" object instead of using a hierarchical object reference
(folder 1 of folder 1 of disk 1):
set desktopPath to (path to desktop)
tell application "Finder"
make new folder at folder desktopPath with properties {name:"untitled
folder"}
set name of folder "untitled folder" of folder desktopPath to "My
Amazing New Folder"
end tell
And of course you probably realize you can just give the actual name to
the "make" verb instead or renaming it, but this is probably just a
learn-by-doing script.
Steve Mills
Drummer, Mac geek
http://sjmills5.home.mchsi.com/
_______________________________________________
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.