Re : Scripting Sherlock engine
Re : Scripting Sherlock engine
- Subject: Re : Scripting Sherlock engine
- From: "Philippe GRUCHET" <email@hidden>
- Date: Fri, 13 Sep 2002 00:42:46 +0100
Hello,
Just a little note about "Find by Content Indexing":
In Mac OS 9 other than English/US version, the name of this app is
translated.
For example, in French, the name is "Indexation du contenu".
To share a such script, I think that it is more appropriate to write:
=========
tell application "Finder"
set theApp to application file id "fbca" as string
set this_filepath to result as text
-- Is it better to use the delimiters...?
set x to offset of ":" in (reverse of every character of this_filepath) as
string
set theAppName to ((characters -(x - 1) thru -1 of this_filepath) as text)
repeat until process theAppName exists
end repeat
set visible of process theAppName to false
end tell
=========
From Philippe:
>
> Something like...
>
> tell app "Sherlock" to index containers alias "HD:filename"
>
> ...open the Sherlock application.
>
> Is it possible to index a file using the Sherlock engine in background
>
> without opening the Sherlock application?
From Kai:
>
You might try something like this, Philippe - which works on my system
>
pretty much as you describe:
>
>
--------------------------------------------------------------------
>
>
set indexItems to {alias "Hard Disk:Documents:"} -- list as required
>
>
tell application "Sherlock 2"
>
launch
>
index containers indexItems
>
quit
>
end tell
>
>
tell application "Finder"
>
repeat until process "Find by Content Indexing" exists
>
end repeat
>
set visible of process "Find by Content Indexing" to false
>
end tell
>
>
--------------------------------------------------------------------
>
>
If Sherlock is not already open, it should not appear. The 'Indexing
>
Progress' window is shown briefly as the indexing process begins - but is
>
then hidden from view for the rest of the operation.
>
>
HTH
>
>
Kai
>
>
--
>
email@hidden
>
email@hidden
Regards,
Philippe
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.