• 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: kai <email@hidden>
  • Date: Tue, 02 Dec 2003 03:05:17 +0000

on Mon, 01 Dec 2003 13:32:13 -0800, Lawrence Conley <email@hidden>
wrote:

> I'm studying Applescript hard for the first time and am writing scripts to
> get my hands dirty and just learn by doing. I wrote the following simple
> script to create a folder on my desktop and then give it a name. The trouble
> is, I want to modify the script so that it will perform the intended
> functions on ANYONE'S desktop but am having a difficult time figuring out a
> correct "set path" statement that will allow the script to create the folder
> in the CURRENT USER'S Desktop folder on anyone's machine. Any ideas? All
> feedback will be most appreciated.
>
>
> 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

One small point to add to the good advice you've already had, Larry.

Since the desktop can be identified as a property of the Finder, I believe
you could get away with specifying *no* path [gasp] - in which case the
desktop should be used as the default. Try something like this (one line):

--------------

tell application "Finder" to make new folder with properties {name:"My
Amazing New Folder"}

--------------

---
kai
_______________________________________________
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.

  • Follow-Ups:
    • Re: Ultra Newbie question
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: new to ascript & filemaker
  • Next by Date: re: It happened again.
  • Previous by thread: Re: Ultra Newbie question
  • Next by thread: Re: Ultra Newbie question
  • Index(es):
    • Date
    • Thread