Automator
文章目录
Look up 会调用MacOS自带的翻译,查询词义。
Search with Bing 会调用Safari,到bing上去搜索答案。
这都不是我想要的。
我喜欢的浏览器是Chrome,我信赖的翻译是Google,国内能用的搜索引擎是百度。
我们可以通过 Automator 来改变它。
在应用程序中找到 Automator 后,新建一个 Service
选择 Utilities ,双击 Run Shell Script 创建脚本:
open "http://translate.google.com/?q=$(cat | ruby -e 'require "cgi"; print CGI.escape($<.read.chomp)')"
然后,Command+S 保存为“用 Google 翻译”
同样的方法,重复操作,再创建一个“用 百度 搜索” :
open "http://www.baidu.com/s?wd=$(cat | ruby -e 'require "cgi"; print CGI.escape($<.read.chomp)')"
之后在“系统偏好设置”的“键盘”-“键盘快捷键”内,将默认的两项隐藏掉:
大功告成。