03/13 辞書.appで指定の単語を検索する v2
指定の単語で辞書.appを検索するAppleScriptです。何も加工しないで日本語の文字を渡すと検索されないので、URLエンコードしてパラメータをつけて実行します。


| スクリプト名:辞書.appで指定の単語を検索する v2 |
| set aText to text returned of (display dialog “なんかいれてね“ default answer “”) set encText to encodeURL(aText) of me set aURL to “dict://“ & encText open location aURL on encodeURL(str) return do shell script (”python -c \”import sys, urllib; print urllib.quote(sys.argv[1]) \” “ as Unicode text) & quoted form of str end encodeURL |

