MacOS – Look Up in Dictionary with “All” filter

dictionarymacosservices

I like the fact that I can launch the dictionary app by highlighting a word in any any application and then going to (Application Name) > Services > Look Up in Dictionary.

However, this selects the Dictionary filter (instead of All, Thesaurus, Apple, or Wikipedia). I would prefer if it selected the All filter instead. Is there any way to create such a global menu item/shortcut which would do the same thing as lookup in dictionary but have it select the All filter instead of the Dictionary filter?

Best Answer

The only way I could get this to work is by creating a new service that looks up the word and than tells Dictionary.app to use the "all" filter.

  1. Open /Applications/Automator.app and select the services template
  2. in the top right part of the screen, you should see that the default input parameters Automator has selected ("Service receives selected text in any application") is just what you want
  3. in the left hand search field, search for an Action called "Run Applescript" and drag it into your workflow
  4. replace the part "(* Your script goes here *)" with the following Applescript, and than choose File->Save. Automator will ask you for a name for your new service (eg. "lookup in all dictionaries" and from that moment on, your service will be available in all applications.

    set dictLocation to "dict:///" & input
    open location dictLocation
     tell application "System Events" to tell process "Dictionary" to keystroke "0"    using command down
    
  5. (optional) You might also want to define a shortcut for you new service by going into "System Preferences">"Keyboard">"Keyboard Shortcuts">"Services", finding your Service in the list of Services, and double-clicking the whitespace next to it do define a global shortcut.