• 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 over eppc?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: path to over eppc?


  • Subject: Re: path to over eppc?
  • From: Christopher Nebel <email@hidden>
  • Date: Mon, 9 Jun 2003 10:39:58 -0700

On Sunday, June 8, 2003, at 07:19 PM, matt neuburg wrote:

The status of the phrases "beep" and "say" and "display dialog" and "path to" is the same - they are all scripting addition commands. But in the following script:

tell app "Finder" of machine "eppc://little-white-duck.local"
beep
say "howdy"
display dialog "howdy"
path to system folder
end

the first three commands are executed on the remote machine, but "path to" is executed on the local machine. I need to know why. Please note, I don't want a workaround; I want an explanation.

That's no bug -- that's a feature! Well, sort of. Here's what's going on: "path to" really is being executed on the remote machine. The tricky bit is that "path to" returns an alias -- an alias, that is, that points to something on a remote machine's disk that the local script can't see! When AppleScript tries to display the alias as a full path, the Alias Manager, in a desperate attempt to produce something "useful," substitutes the local disk name for the remote disk name, comes up with a valid path, says aha! and hands it back to you. (If I remember right, QuickTime added that little stunt back around Mac OS 8.6 or so. Something about making otherwise broken aliases resolve more often.)

The upshot is that aliases aren't entirely meaningful over eppc, since files visible on one side aren't visible on the other. (It should work if you take the resulting alias and hand it back to the remote side; you just can't inspect the alias locally.) If you say "path to ... as string", you'll see the correct remote path.


--Chris Nebel
Apple Development Tools
_______________________________________________
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.

  • Prev by Date: Date math question
  • Next by Date: Re: Date math question
  • Previous by thread: Re: path to over eppc?
  • Next by thread: Delete me...
  • Index(es):
    • Date
    • Thread