Re: Universal or general path to desktop?
Re: Universal or general path to desktop?
- Subject: Re: Universal or general path to desktop?
- From: Ben Waldie <email@hidden>
- Date: Tue, 8 Apr 2003 09:09:19 -0400
Mike,
On Tuesday, April 8, 2003, at 02:22 AM, MR wrote:
but I don't see how that will help. A ((path to desktop folder as
string)) will be different for every desktop. e.g. the example I gave
specific to my desktop is
"Macintosh HD: users:Mike:desktop:PDFfiles:"
whereas the path to another desktop might be
"Payables HD:users:Linda:desktop:PDFfiles:"
Right. The actual path to the desktop folder may vary from machine to
machine. However, the "path to" event will allow your script to
dynamically determine this path regardless of what machine the script
is running on, without the need to hard code a path into your script.
Just write the actual code "path to desktop folder as string" in your
script, and you'll see that when you run the script, the path to the
desktop folder is properly calculated on any machine. The "path to"
event can be found in the "Standard Additions" scripting addition, and
can be used to dynamically determine the paths to many other locations
also.
From the Standard Additions Dictionary:
path to: Returns full path name to the folder or application specified
(from File Commands) (defined in: StandardAdditions.osax)
path to apple menu/application support/control panels/control strip
modules/desktop/desktop pictures folder/extensions/Folder Action
scripts/fonts/help/launcher items folder/modem
scripts/plugins/preferences/printer descriptions/printer
drivers/printmonitor/scripts folder/scripting additions/shared
libraries/shutdown/speakable items/trash/startup/startup disk/system
folder/temporary items/voices/keychain folder/current user folder/users
folder/system preferences -- the folder or application to return
[from System domain/local domain/network domain/user domain] --
where to look for the indicated folder
[as type class] -- the type to return: alias or string (default is
alias)
Result: alias -- the path name to the folder or application specified
Hope this clarifies things,
- Ben
Benjamin S. Waldie
Automated Workflows, LLC
=============================================
AppleScript and Workflow Automation
Consulting - <
http://www.automatedworkflows.com>
AppleScript Info - <
http://www.applescriptguru.com>
AppleScript Training - <
http://www.applescripttraining.com>
=============================================
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.