• 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: Desktop question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Desktop question


  • Subject: Re: Desktop question
  • From: Bill Cheeseman <email@hidden>
  • Date: Mon, 22 Jan 2001 21:18:24 -0500

on 1/22/01 5:15 PM, Marc K. Myers at email@hidden wrote:

> If I say
>
> tell application "Finder"
> set theAlias to (duplicate file "someFile") as alias
> end tell
>
> and someFile is on the startup disk's desktop, it works just as I'd
> expect it to. The variable "theAlias" contains an alias reference to
> the new copy of the file. But if someFile is on some other volume's
> desktop, I get
>
> -->Finder got an error: Can't get folder "Desktop Folder" of disk
> "Communications".

When you run the script on a file on the other disk, you have to tell the
Finder that it's on the other disk. Something like this:

set theAlias to (duplicate file "someFile" of folder "Desktop Folder" of
disk "Other Disk") as alias

Or maybe just this:

set theAlias to (duplicate file "someFile" of disk "Other Disk") as alias

-
Bill Cheeseman, Quechee, Vermont <mailto:email@hidden>

The AppleScript Sourcebook
<http://www.AppleScriptSourcebook.com/>
Vermont Recipes-A Cocoa Cookbook
<http://www.stepwise.com/Articles/VermontRecipes/>


References: 
 >Desktop question (From: "Marc K. Myers" <email@hidden>)

  • Prev by Date: Re: Delay
  • Next by Date: Re: [ANN] Report on AS 1.5.5 from AppleScript Sourcebook
  • Previous by thread: Desktop question
  • Next by thread: Re: Desktop question
  • Index(es):
    • Date
    • Thread