Re: Looking for a disk in disks
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