• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Spotlight: obtain active query on app launch
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Spotlight: obtain active query on app launch (From: David Melgar <email@hidden>)

  • Prev by Date: Spotlight: obtain active query on app launch
  • Next by Date: Re: How to implement IB-like Inspector Palette?
  • Previous by thread: Spotlight: obtain active query on app launch
  • Next by thread: CPU utilization in Snow Leopard
  • Index(es):
    • Date
    • Thread