• 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: Ultra Newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Ultra Newbie question (From: Lawrence Conley <email@hidden>)

  • Prev by Date: Re: list disks on Panther
  • Next by Date: Re: Ultra Newbie question
  • Previous by thread: Ultra Newbie question
  • Next by thread: Re: Ultra Newbie question
  • Index(es):
    • Date
    • Thread