Creating a folder on the desktop
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