Re: Creating a folder on the desktop (recap)
Re: Creating a folder on the desktop (recap)
- Subject: Re: Creating a folder on the desktop (recap)
- From: patrick machielse <email@hidden>
- Date: Thu, 08 Sep 2005 14:51:18 +0200
Everybody,
Thanks for all the info you provided in response to my initial
message. It was (mostly) what I needed to get ahead. Let me
recapitulate the results:
It turns out that my problems with the original code
tell application "System Events"
make new folder at desktop folder
end tell
were due to a bug. It's hard to find such information, even using
Google c.s.
Thanks go out to John Welch for his rule of thumb on when to use
Scripting Additions, System Events, or the Finder to get folder
info. Still this situation remains a bit problematic; when I need
both the label and the visibility of a folder I'll need to query both
System Events and Finder? Easy once you know, I guess.
I further learned / found out that support for true UNIX file paths
seems constricted to "System Events" and that POSIX path / file is
not a complete peer, in that it can't resolve "~/.." etc.
Armed with this knowledge I can continue on my way to AS mastery.
One thing I expected was a bit more help from the compiler. For
instance, when I, naively, try the following, deceptively valid
looking code:
tell application "System Events"
get entire contents of desktop folder
end tell
I would like a compiler warning instead of a runtime error (in
"System Events", entire contents is a property of the UI element
class, not of the folder class) I believe this would be possible
without compromising concepts of AppleScript.
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