in google, you can do "define:cat" and it will give you a list of definitions.
Does anyone know how to get the definitions of a word with applescript from google?
Thanks!
in google, you can do "define:cat" and it will give you a list of definitions.
Does anyone know how to get the definitions of a word with applescript from google?
Thanks!
Rough and tumble, but it works...
tell application "Safari"
make new document with properties {URL:"http://www.google.com/search?q=define%3Acat"}
set theDocument to document 1
set theSource to source of theDocument -- result: source code for the page.
end tell
Note that the search term can be tacked onto the end after the delimiter %3A
. From there, you'll have to scrape what you want from the page, but that's icky in even the best of languages.