oops!! i forgot, you DONT want to see the window. try this:
using terms from application "Quicksilver"
on process text largetype
set largetypetext to largetype
tell application "Dictionary"
activate
delay 2
tell application "System Events"
keystroke largetypetext & space & return
end tell
end tell
tell application "System Events"
tell process "Dictionary"
tell window 1 to click checkbox 2
try
tell UI element 1 of scroll area 1 of group 1 of UI
element 1 of scroll area 1 of splitter group 1 of window 1 to set
thecount to count of groups
on error e
tell table 1 of scroll area 1 of splitter group 1 of
window 1
if exists static text 1 of row 1 then
if not (exists text field 1 of row 2) then
set theresult to value of static text 1
of row 1
tell application "Dictionary" to quit
return theresult
end if
end if
set thecount2 to count of row
set thealternatives to {}
repeat with i from 2 to thecount2
set thealt to value of text field 1 of row i
set end of thealternatives to thealt & return
end repeat
set thealternatives to "word not found.
alternatives:" & return & thealternatives as text
tell application "Dictionary" to quit
return thealternatives
end tell
end try
repeat with i from 1 to thecount
tell UI element 1 of scroll area 1 of group 1 of UI
element 1 of scroll area 1 of splitter group 1 of window 1 to set
thetext to value of static text of group i
set AppleScript's text item delimiters to " "
set thetext to text items of thetext
set thetext to thetext as string
set AppleScript's text item delimiters to ""
set end of the thelist to return & thetext
end repeat
end tell
end tell
set thelist to thelist as text
tell application "Dictionary" to quit
return thelist
end process text
end using terms from