小编Ran*_*r G的帖子

Applescript用于使用Mail创建新消息应用程序

我有一个AppleScript for Mail.app,它将打开一个新的消息窗口,其中包含预定义的收件人地址和主题。每次我运行该脚本都会打开一个新窗口:

tell application "Mail"
    set newMessage to make new outgoing message with properties {subject:"some subject", content:"" & return & return}
    tell newMessage
        set visible to true
        make new to recipient at end of to recipients with properties {name:"some name", address:"some address"}
    end tell
    activate
end tell
Run Code Online (Sandbox Code Playgroud)

但是我希望脚本仅在关闭先前打开的窗口时才打开新的消息窗口–否则,先前打开的窗口应位于最前面。

谁能帮我修改此脚本以实现上述功能?

applescript

5
推荐指数
1
解决办法
7353
查看次数

标签 统计

applescript ×1