| 使用Automator在Terminal中打开文件夹 |
| [ 作者:佚名 转贴自:网络转载 阅读次数:12 更新时间:2006-6-20 10:32:00 录入:刘光勇 ] |
|
|
|
制作完成以后的效果


制作步骤
1. 启动Automator, 从左边资源库中选择Finder, 选择"获得Finder所选项",拖动到右边
2. 从左边资源库中选择Automator, 拖动"运行AppleScript"到右边,在其中输入
on run {input, parameters} tell application "Terminal" activate if (the (count of the window) = 0) or (the busy of window 1 = true) then tell application "System Events" keystroke "n" using command down end tell end if do script "cd \"" & (POSIX path of (input as string)) & "\"" in window 1 end tell return input end run
3. 选择菜单 文件->储存为插件,选Finder插件,输入名字CD
让后就可以出现上面的效果了
发现Automator和AppleScript挺好玩的,hehe
|
|
|