【问题标题】:Change the icon of an applescript-called notification更改名为 applescript 的通知的图标
【发布时间】:2013-10-28 04:01:59
【问题描述】:

有了 OSX Mavericks,我们现在可以很容易地制作 notifications with applescript。但是,似乎没有办法将显示的图标更改为自定义图标。有没有办法做到这一点?

【问题讨论】:

    标签: macos applescript osx-mavericks


    【解决方案1】:

    display notification 将获取应用程序图标。您可以在 applescript 应用程序的 bunlde 内容中设置图标。

    set fileName to choose file "Select a Folder"
    display notification "Parag Bafna" subtitle "Its working" & fileName
    

    display notification    text    required
    with title  text    optional
    subtitle    text    optional
    sound name  text    optional
    

    【讨论】:

    • “显示通知”似乎没有图标。即使您提供的显示通知文档也没有显示图标输入的任何指示。
    【解决方案2】:

    您只需更改脚本/应用程序本身的图标即可更改图标。将您想要的图片复制为图标(⌘ + C),右键单击您保存的应用程序/脚本文件,“获取信息”,单击左上角的文件图标,粘贴(⌘ + V)。如果您保存为脚本包,您还可以将包中的 icns 文件交换为您自己的(在 Resources 文件夹中)。

    【讨论】:

      猜你喜欢
      • 2019-07-20
      • 1970-01-01
      • 2015-02-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-27
      • 2018-03-22
      相关资源
      最近更新 更多