Finding OSA scripts with Spotlight

UPDATE: Script Debugger 6’s Open Quickly feature makes the task of finding scripts amazingly simple. If you get a chance, check out the Script Debugger 6 free trial.

With the release of Script Debugger 4.0, I added a Spotlight searching capability for OSA scripts created with Script Debugger.  Based on a series of customer support emails I realized that this is not a well documented aspect of the product.  Here is a quick overview of how to use Script Debugger Spotlight support to find OSA scripts on your Macintosh.

NOTE: Spotlight indexing of OSA scripts only works for scripts that have beenn saved using Script Debugger.  Scripts created with Apple’s Script Editor are not indexed.

Script Debugger provides indexing information for three aspects of your OSA scripts:

  1. the source text of the script (kMDItemTextContent)

  2. the script’s description (kMDItemDescription)

  3. the script’s language name (kMDItemKeywords) which is normally “AppleScript”

Here some ways to find all the scripts on your Macintosh which target the Apple Mail application.  First, we’ll search for documents containing “Mail” and with the AppleScript keyword:


This is good, but we get some documents that are not scripts.  Instead, we’ll search for OSA scripts that contain “Mail”:

Perfect, all the OSA scripts on my machine that target the Apple Mail application.


2 thoughts on “Finding OSA scripts with Spotlight”

Comments are closed.