set searchURL to "http://www.google.co.jp/search?q=" tell application "Internet Explorer" Activate if selected text is not "" then set searchWord to my delChar(selected text, return) ---display dialog searchWord --- Debug 用 OpenURL searchURL & searchWord end if end tell --- 文字列 theText から theChar を削除する on delChar(theText, theChar) set tmp to AppleScript's text item delimiters set AppleScript's text item delimiters to theChar set theList to every text item of theText set AppleScript's text item delimiters to "" set theText to theList as string set AppleScript's text item delimiters to tmp return theText end delChar