• 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: Looking for a disk in disks
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for a disk in disks


  • Subject: Re: Looking for a disk in disks
  • From: Emmanuel <email@hidden>
  • Date: Sun, 28 Oct 2001 22:43:09 +0100

At 21:37 +0100 28/10/01, Mark Bjfrgager wrote:
>
>How can I test if a certain volume is mounted on the mac ?
>
>I am trying to use
>
>Tell app "Finder" to set theDisks to the disks
>If "home" is in theDisks then beep
>
>Only it never does, how can use this ?

theDisks is a list ... of disks, which are strictly Finder's objects.

You have to ask the "Finder" is some item belongs to it:

---------------------- tested
Tell app "Finder" to set theDisks to the disks
tell application "Finder" to set itIsHere to (disk "home" is in theDisks)
----------------------

Your script would have worked if theDisks had been a list of strings.

Such would have been the case if you had written:

---------------------- tested
tell application "Finder" to set theDisks to name of the disks
----------------------

HTH
Emmanuel


References: 
 >Re: Next new AppleScripter question :) (From: Bill Vinson <email@hidden>)
 >Re: Next new AppleScripter question :) (From: Bill Cheeseman <email@hidden>)
 >Looking for a disk in disks (From: Mark Bjærgager <email@hidden>)

  • Prev by Date: Hotmail folders in OE
  • Next by Date: Emailer scripts
  • Previous by thread: Re: Looking for a disk in disks
  • Next by thread: AppleScript & old PowerMacs
  • Index(es):
    • Date
    • Thread