在mac用脚本打开应用,无提示关闭终端窗口命令
osascript -e "tell application \"System Events\" to keystroke \"w\" using command down" 这模拟了 CMD + w 按键。 如果您希望终端完全退出,您可以使用: osascript -e "tell application \"System Events\" to keystroke \"q\" using command down" 这不会产生任何错误,并使终端干净利落。
本文介绍如何在Mac上使用osascript命令来模拟键盘操作,包括无提示关闭应用和干净退出终端的方法。

1555

被折叠的 条评论
为什么被折叠?



