使用 AppleScript 打开邮件
我想我可以这样做:
tell application "Mail"
activate
end tell
虽然我可以在顶部看到邮件工具栏。它并没有将邮件应用程序带到最前面以使其完全可见。
我的录音机也由于某种原因无法工作,所以我无法用它来找出我需要做什么。
我该怎么做?
I thought I could just do this:
tell application "Mail"
activate
end tell
Although I can see the Mail toolbar at the top. It hasn't brought the mail app to the front to be fully visible.
My recorder doesn't work for some reason too, so I can't use that to find out what I need to do.
How can I do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可能已经关闭了邮件窗口,因此当您激活应用程序时,不会显示任何打开的窗口。因此,您必须自己打开一个。请注意,邮件中的主窗口称为“消息查看器”。试试这个...
AppleScript:
JXA:
顺便说一下,录音机在大多数应用程序中都不起作用,所以当我听说它不适用于邮件时,我并不感到惊讶。应用程序作者必须将此功能编码到程序中,而大多数开发人员(包括 Apple)不会这样做。
You probably have closed the mail window so when you activate the application there isn't any open windows to show. As such you have to open one yourself. Note that the main window in mail is called a "message viewer". Try this...
AppleScript:
JXA:
By the way, the recorder doesn't work in most applications so I'm not surprised to hear that it doesn't work for Mail. An application author has to code this ability into the program and most developers (including Apple) do not do this.
你正在做的事情应该有效。不知道为什么它不适合你。
What you're doing should work. Not sure why it's not working for you.
好吧,您随时可以尝试再次激活它。或者,您可以直接告诉 Finder 启动它,看看效果是否更好:
Well, you can always try activating it a second time. Alternatively, you can just tell the Finder to launch it and see if that works any better: