JEditのApplescriptマクロです。
JEditで選択した単語に従い、FireFox上でYahooの英和辞書を開きます。
まわりくどいスクリプトですが、どうも、これがうまく動くみたいです。
tell application "Jedit X"
tell front document
set theURL to "http://dic.yahoo.co.jp/dsearch?enc=UTF-8&stype=0&dtype=1&p=" & selected text
--set CLBD to the clipboard うまくいかない
tell application "Firefox"
activate
delay 0.1
set the clipboard to theURL
tell application "System Events" to keystroke "t" using {command down}
--delay 1
tell application "System Events" to keystroke "l" using {command down}
tell application "System Events" to keystroke "v" using {command down}
tell application "System Events" to keystroke return
end tell
--set the clipboard to CLBD
end tell
end tell