AppleScript在终端中打开新选项卡不再在Mountain Lion中工作?
我曾经在Lion中运行以下代码来打开terminal,更新一个项目,然后打开一个新选项卡,然后再次运行以更新第二个、第三个和第四个。自从山狮升级后,此功能不再有效。一半的时间似乎是在我的主目录中打开Finder,另一半时间似乎是打开OSX字体/文本对话框。我已经确认Cmd+T仍应打开一个新选项卡。知道它为什么坏了吗AppleScript在终端中打开新选项卡不再在Mountain Lion中工作?,applescript,osx-mountain-lion,Applescript,Osx Mountain Lion,我曾经在Lion中运行以下代码来打开terminal,更新一个项目,然后打开一个新选项卡,然后再次运行以更新第二个、第三个和第四个。自从山狮升级后,此功能不再有效。一半的时间似乎是在我的主目录中打开Finder,另一半时间似乎是打开OSX字体/文本对话框。我已经确认Cmd+T仍应打开一个新选项卡。知道它为什么坏了吗 tell application "Terminal" to activate tell application "Terminal" do script "cd Pro
tell application "Terminal" to activate
tell application "Terminal"
do script "cd Projects/blahblah/trunk" in front window
do script "svn up" in front window
end tell
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down
由于某种原因,我需要告诉终端在每次呼叫之间激活。狮子从来没逼我这么做
tell application "Terminal" to activate
tell application "Terminal"
delay 0.25
do script "cd Projects/firstone/trunk && svn up" in front window
end tell
tell application "Terminal" to activate
tell application "System Events" to tell process "Terminal" to keystroke "t" using command down
tell application "Terminal"
delay 0.25
do script "cd Projects/secondone/trunk && svn up" in front window
end tell
从这里()看来,似乎是类似于告诉应用程序“终端”来激活告诉应用程序“终端”来激活告诉应用程序“终端”延迟0.25做脚本“cd项目/firstone/trunk&&svn向上”在前窗口结束告诉应用程序“终端”来激活告诉应用程序“系统事件”要告诉进程“终端”使用命令下击“t”,请告诉应用程序“终端”延迟0.25在前窗口结束时告诉脚本“cd Projects/secondone/trunk&&svn up”