Dear Gary,
I would be grateful if you could give me the step-by-step guide to set up a Service (available from all applications) that would give me the meaning of a highlighted word. I know this option is already there, but I would like to know how that has been done.
Also could you tell me how I can delete (not just disable) a service I have already set up.
Many thanks in advance,
Dav
— Dav
Well, the right+click option to look up a word in the dictionary isn't the type of service that was made in automator. It is built into OS X. As far as I can tell there is no way to use Automator to open the Dictionary application and feed it a word.
But you can build something similar.
Set up a service in Automator that receives "text" in "any application."
Then add "Get Definition of Word" as the first step. Then "run AppleScript" as the second step. Use something like this as your AppleScript:
on run {input, parameters}
repeat with inputItem in the input
display alert inputItem
end repeat
end run
Then save it and it will appear as a service in the Services submenu, and when you right+click a select piece of text.
As for how to delete services, look in the ~/Library/Services folder and delete them from there.
Thanks Gary, that works very well.
I deleted the file I had generated in the ~/Library/Services folder, but the service still shows when I right click. If I rename that file, again the old name is shown in the service. What am I doing wrong?
Thanks,
Dav
I believe it takes time for OS X to realize the file is gone. Log out and that back in, maybe?
Yes, Gary, although I couldn't understand what the code did, it certainly worked. Thank you