如何使用AppleScript退出文件窗口?
我想使用AppleScript退出文件窗口。
示例:想象一下foo.rtf已打开,我想使用以下脚本
tell application "Finder" to quit "/Users/xyz/Desktop/foo.rtf"
结果退出应用程序: 而不是退出文件,而是退出查找器,而不是文件
I would like to quit a file window using applescript.
Example: Imagine foo.rtf is opened, I want to quit the app using the following script
tell application "Finder" to quit "/Users/xyz/Desktop/foo.rtf"
Result:
Instead of quitting the file it quits Finder but not the file
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
退出
,窗口响应CLOSS
。窗口
元素的applescript字典时,才能有效。如果不是,您可以使用系统事件和GUI脚本关闭窗口。quit
, a window responds toclose
.window
element. If not you can close the window with System Events and GUI scripting.