help AS script to search for files using Sherlock gets indexing error??
help AS script to search for files using Sherlock gets indexing error??
- Subject: help AS script to search for files using Sherlock gets indexing error??
- From: Bill Christens-Barry <email@hidden>
- Date: Thu, 13 Sep 2001 18:15:41 -0400
I have a real dilemma: I'm trying to use a script to do a Sherlock
search of a volume and keep getting a "volume is not indexed" error
msg. I am searching for file names, not by content, so I don't
understand where/why indexing comes in. The volume in question was
formatted under Windows and is mounted on the Mac hosting Sherlock
and AppleScript.I understand that indexing may not be possible for
such volumes, but this shouldn't enter in since I'm not. Still, it
smells like a problem due to the treatment of the Windows volume.
My colleague who is testing the script elsewhere is able to search
the same volume:directory: using Sherlock by hand (that is without it
being carried out by a script) but gets the error when he runs my
script. The script works fine on my all-Mac system, running MacOS 8.6
and AppleScript 1.4.3. The system my colleague is using is an older
flavor of MacOS 9.
Here's the script:
set theStartTime to the clock using system form "%T"
set theRoot to "0100123"
tell application "Sherlock"
search {"trans:transfer:"} for theRoot
set theHitList to result
end tell
set hitCount to count of theHitList
set plainList to {}
repeat with i from 1 to hitCount
set plainList to plainList & ((item i of theHitList) as string)
end repeat
set theFinishTime to the clock using system form "%T"
display dialog ("Found " & hitCount & " matches.")
display dialog ("Started at " & theStartTime & " and finished at " &
theFinishTime & ".")
display dialog ("Hit splat-L (after hitting OK button) to see list of
matching files.")
plainList
I tried explicitly searching for "theRoot as alias" even though the
script worked locally as given above (using the local volume and
directory name,of course). I tried using an index AS command as in
Sherlock's dictionary, to no avail.
Any ideas?
Thanks.
Bill Christens-Barry
-----------------------
Bill Christens-Barry, PhD
Equipoise Imaging, LLC
email@hidden