• 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
Creating a folder on the desktop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Creating a folder on the desktop


  • Subject: Creating a folder on the desktop
  • From: patrick machielse <email@hidden>
  • Date: Tue, 06 Sep 2005 16:35:39 +0200

I can't get this to work

tell application "System Events"
    make new folder at desktop folder
end tell

I tried dozens of variations, POSIX paths, 'with properties', etc. Mostly gives me NSContainerSpecifierError back, but 'desktop folder' is a good reference, or isn't it.

After struggling with this for a _long_ time, I found that

tell application "Finder"
    make new folder at desktop
end tell

does indeed do what I want.

I'm an AppleScript newby, and this kind of thing really makes me loose faith in AS. I never felt this frustrated before when learning any real programming languages :-(

Some further madness:

    set myDesktop to folder "~/Desktop"

works in System Events, but not in Finder. Why do System Events and Finder seem to duplicate functionality in an incompatible way? Is there any documentation on this stuff that I can read _before_ I loose my marbles?

Sorry if this is a bit of a rant, I should take a short break...

patrick
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Creating a folder on the desktop
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: Re: Select Finder items by Regular Expression
  • Next by Date: Re: still having trouble with SOAP
  • Previous by thread: Re: exists ... index 0 returns true
  • Next by thread: Re: Creating a folder on the desktop
  • Index(es):
    • Date
    • Thread