I am a non-english native speaker and therefore use the OSX's built-in look up service (three-finger tab and cmd+L
in the spotlight search field) quite a lot.
I was wondering if there was a way to keep track of or record the words I have looked up? (Applescript perhaps?)
EDIT: When I three-finger tab it also gives me definitions from wikipedia. Could I utilise this, i.e. track the requests Dictionary.app sends to wikipedia.org, to track which words I look up?
Best Answer
You can't do this with the normal three-finger tap, but if you make an Automator service with some Applescript, you can trigger it on a keyboard shortcut. (Note: This shows a full dictionary window, not a nice popover. I don't think there's a way to do it like that.)
To make this service, open Automator.app, in the
/Applications/
folder.Choose Service.
Then, in the Library on the left, search for AppleScript, and drag Run Applescript over.
Here's the script to paste in.
Click the hammer to compile. It should look like this:
The last thing to do is assign a keyboard shortcut. Save the workflow (I called mine "look up"), and open System Preferences. Go to Keyboard > Keyboard Shortcuts > Services.
Select your service (It should be under Text), then click "add shortcut" and type the shortcut you'll be using to trigger it. I like to use command ⌘+control ^ and a letter, because those are almost guaranteed not to be already in use by an application.
That should work! Just select a word by double-clicking, then type your keyboard shortcut to use it.