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

Re: Coercion question


  • Subject: Re: Coercion question
  • From: Hugh Dixon <email@hidden>
  • Date: Fri, 15 Jun 2001 12:10:37 +0000

On 15/6/01 8:07 am, Jan Pieter Kunst wrote

> Hello all,
>
> Is it possible to coerce this:
>
> alias "Disk:Folder:File"
>
> to this:
>
> {file "File" of folder "Folder" of startup disk}
>


Hi Jan,

If the alias ends in a colon, it's an alias to a folder. If it doesn't, it's
an alias to a file (application or document).

So...


if last character of (the_alias as text) is ":" then

display dialog "It's a folder"

else

display dialog "It's a file"

end if

Alternatively you could use info for:

if folder of (info for the_alias) is true then

display dialog "It's a folder"

else

display dialog "It's a file"

end if

Hope this helps.

Hugh




**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


  • Follow-Ups:
    • Re: Coercion question
      • From: "Serge Belleudy-d'Espinose" <email@hidden>
References: 
 >Coercion question (From: Jan Pieter Kunst <email@hidden>)

  • Prev by Date: Re: Question about "info for" command
  • Next by Date: Re: Coercion question
  • Previous by thread: Coercion question
  • Next by thread: Re: Coercion question
  • Index(es):
    • Date
    • Thread