Re: Spotlight: obtain active query on app launch
Re: Spotlight: obtain active query on app launch
- Subject: Re: Spotlight: obtain active query on app launch
- From: "Adam R. Maxwell" <email@hidden>
- Date: Fri, 25 Sep 2009 19:37:24 -0700
On Sep 25, 2009, at 7:29 PM, David Melgar wrote:
Hello,
If a spotlight query finds data in an application specific file,
selecting that file will launch the unique application.
How can the application determine the query that was in effect when
it was launched?
As a concrete example where I've seen it done, if spotlight finds a
string in an OmniOutliner file, selecting that file opens
OmniOutliner and the application brings up a search panel showing
all matches within the file. What API did they use to do that?
You need to read keyAESearchText from the open documents Apple Event.
See http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Conceptual/ScriptableCocoaApplications/SApps_handle_AEs/SAppsHandleAEs.html
or google for keyAESearchText.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden