我希望这个脚本能够切换应用程序(命令选项卡):
$ cat hello.applescript
tell application "System Events"
 key code 48 using command down
end tell
但它只是打印出一个标签:
$ osascript hello.applescript
⏎   
我在OS X 10.9.4上
我希望这个脚本能够切换应用程序(命令选项卡):
$ cat hello.applescript
tell application "System Events"
 key code 48 using command down
end tell
但它只是打印出一个标签:
$ osascript hello.applescript
⏎   
我在OS X 10.9.4上
Answers:
 根据  这个  你需要告诉 Finder 以及: 
tell application "System Events"
  tell process "finder"
    activate
    keystroke tab using {command down}
  end tell
end tell
但我也喜欢通过名称指定应用程序的建议......