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
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