• 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: Path to DeskTop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Path to DeskTop


  • Subject: Re: Path to DeskTop
  • From: Michelle Steiner <email@hidden>
  • Date: Thu, 19 Apr 2007 10:05:45 -0700


On Apr 19, 2007, at 9:59 AM, KOENIG Yvan wrote:

set deskPath to path to desktop

"path to desktop folder" is slightly better because it works within a tell block for the Finder, whereas "path to desktop" doesn't.


tell application "Finder"
	path to desktop folder
end tell

Both forms work with other applications, however, and both work outside of tell blocks.

Advices may differ ;-)

From my point of view,

path to desktop

is better because it doesn't require the Finder which I try to drop each time I may replace it by Sytem Events.

"folder" is required by the Finder. "folder" can't be there with System Events. Both work everywhere else. Ah, the joys of consistency.


--
"To occupy Iraq would instantly shatter our coalition, turning the whole Arab world against us and make a broken tyrant into a latter- day hero ... assigning young soldiers to a fruitless hunt for a securely entrenched dictator and condemning them to fight in what would be an un-winnable urban guerilla war. It could only plunge that part of the world into even greater instability."
- George H.W. Bush


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Path to DeskTop (From: Oakley Masten <email@hidden>)
 >Re: Path to DeskTop (From: James Nierodzik <email@hidden>)
 >Re: Path to DeskTop (From: Michelle Steiner <email@hidden>)
 >Re: Path to DeskTop (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Re: Path to DeskTop
  • Next by Date: Re: Path to DeskTop
  • Previous by thread: Re: Path to DeskTop
  • Next by thread: Re: Path to DeskTop
  • Index(es):
    • Date
    • Thread