Retrieving string entered in spotlight and showing the calculated result in the list

Discussion in 'Mac Programming' started by Monaj, Jan 30, 2012.

  1. macrumors regular

    Joined:
    May 24, 2009
    #1
    Hi All,

    We have a very nice feature in Mac OS X, whenever we type any expression such as: 35 + 36, in spotlight, it shows: Calculator - <calculator app icon> - 71 in the result list.

    It seems like whatever user is typing as an expression in spotlight, calculator application is taking it as input and showing the calculated value in result list.

    I want to make a sample application behaving in the same way, and when I did some searching on net, I found couple of keywords such as- spotlight API, spotlight plugin, but I am not sure if any of these is going to serve the intended purpose.

    Can anyone direct me towards right direction?

    Thanks
     
  2. Moderator emeritus

    robbieduncan

    Joined:
    Jul 24, 2002
    Location:
    London
    #2
    I don't think there is a public API to do what the results do with calculator: that is a special case. I've certainly never seen any other app manage to interface like that.
     

Share This Page