• 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: Difference between "as alias" and "as file spec
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difference between "as alias" and "as file spec


  • Subject: Re: Difference between "as alias" and "as file spec
  • From: John W Baxter <email@hidden>
  • Date: Thu, 13 Dec 2001 08:26:20 -0800

At 23:09 -0500 12/12/2001, email@hidden wrote:
>Then, there's the 'file "Disk:path:name"' reference, which isn't a
>file specification exactly, but an object reference. As such, its
>like 'window 1' or 'document "MyFile"' or 'application "Microsoft Word"':
>It isn't really resolved to a concrete thing, but passed to the target
>application. And AppleScript itself can't resolve it, so
>
> set f to file "Mydisk:"
>
>gives an error.

True, but

set fr to a reference to file "Mydisk:"

can be useful at times.

Script debugger shows that this has the value (expressed in the
technobabble of the underlying AE Manager object):
obj {
form:'name',
want:type('file'),
seld:"Mydisk:",
from:'null'()
}
or, in source language:
file "Mydisk:" of <<script>>

(That is, when it is examined by some application, it is up to the
Application to deal with a file whose full path is given as a string. The
above was run in Mac OS X...it hasn't changed since sometime around 1994
when I sent a file "..." thing over to Frontier to see what was inside.)

--John


References: 
 >Re: Difference between "as alias" and "as file spec (From: email@hidden)

  • Prev by Date: Re: URL access scripting
  • Next by Date: Re: URL access scripting
  • Previous by thread: Re: Difference between "as alias" and "as file spec
  • Next by thread: Full list of scripting bugs in OS 9.2.2 ?
  • Index(es):
    • Date
    • Thread