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

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


  • Follow-Ups:
    • Re: Creating a folder on the desktop (recap)
      • From: "Mark J. Reed" <email@hidden>
    • Re: Creating a folder on the desktop (recap)
      • From: Martin Orpen <email@hidden>
    • Re: Creating a folder on the desktop (recap)
      • From: "John C. Welch" <email@hidden>
  • Prev by Date: RE: Creating a folder on the desktop
  • Next by Date: Re: Missing values and Script Editor request
  • Previous by thread: Re: Thank You Satimage
  • Next by thread: Re: Creating a folder on the desktop (recap)
  • Index(es):
    • Date
    • Thread