Thesaurus in Entourage

A

Allen Watson

Unfortunately, I have no free time to look into this problem. Getting ready
for a week away at Macworld.

Paul made another suggestion to me privately, which seems to work. Here is
his version of the script:

set oc to the clipboard
set the clipboard to ""
tell application "System Events"
set theApp to name of first process whose frontmost is true
tell process theApp
-- Copy selected word
keystroke "c" using command down
end tell
delay 1 -- Wait for clipboard to get set
end tell
set X to the clipboard
set the clipboard to oc
if (count words of X) ‚ 1 then
display dialog "Word to look up?" default answer X
set X to text returned of result
end if
if (length of X) = 0 then
beep
set the clipboard to oc
return
end if

set theURL to "http://thesaurus.reference.com/search?q=" & X & "&db=roget"

tell application "System Events" to open location theURL
 
A

aRKay

Allen Watson said:
Unfortunately, I have no free time to look into this problem. Getting ready
for a week away at Macworld.

Paul made another suggestion to me privately, which seems to work. Here is
his version of the script:

set oc to the clipboard
set the clipboard to ""
tell application "System Events"
set theApp to name of first process whose frontmost is true
tell process theApp
-- Copy selected word
keystroke "c" using command down
end tell
delay 1 -- Wait for clipboard to get set
end tell
set X to the clipboard
set the clipboard to oc
if (count words of X) ‚ 1 then
display dialog "Word to look up?" default answer X
set X to text returned of result
end if
if (length of X) = 0 then
beep
set the clipboard to oc
return
end if

set theURL to "http://thesaurus.reference.com/search?q=" & X & "&db=roget"

tell application "System Events" to open location theURL


This one works great! Thanks to Allen and Pual

aRKay
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top