Re: Handling open as a result of spotlight search
Re: Handling open as a result of spotlight search
- Subject: Re: Handling open as a result of spotlight search
- From: Shawn Erickson <email@hidden>
- Date: Thu, 5 May 2005 15:16:29 -0700
On May 5, 2005, at 3:03 PM, The Karl Adam wrote:
Preview.app has the ability to discern when a spotlight search led to
it's being launched and then puts that into it's search box and
highlights the first occurence of the string searched for.
How do I handle the same event for other apps? Is it a special event?
Is the search on the shared search buffer and I just have to check if
I was launched from Spotlight using LaunchServices?
Any help would be appreciated guys, anf if anyone knows exactly how
Preview does it, feel free to share.
I did a quick search on Apple's developer site (using Apple's little
search box) using the following string "spotlight application launch"
and got a few hits...
Look for open document event on the following page...
<http://developer.apple.com/documentation/Cocoa/Conceptual/
Scriptability/Concepts/ScriptabilityOverview.html>
"Starting in Mac OS X version 10.4, the open documents Apple event
may contain an optional parameter containing search text from the
Spotlight search that specified the documents to be opened. This
parameter is identified by the keyword keyAESearchText. The
application should make a reasonable effort to indicate occurrences
of the search text in each opened document—for example by scrolling
the text into view. The Application Kit does not currently handle
this parameter, but you can check for the presence of this parameter
using NSAppleEventManager API and provide your own implementation."
-Shawn
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden