【问题标题】:Now Playing window in AppleScriptAppleScript 中的“正在播放”窗口
【发布时间】:2013-04-25 05:52:04
【问题描述】:

我想知道如何使用“脚本实用程序”制作脚本,单击该脚本后会返回一个窗口,显示 iTunes 中正在播放的歌曲名称和艺术家。对 AppleScript 非常陌生,并且花了一个小时试图使其正常工作!

谢谢, 内森

【问题讨论】:

    标签: applescript itunes


    【解决方案1】:

    有一个current track 属性:

    tell application "iTunes"
        tell current track to artist & " - " & name
        display dialog result
        --do shell script "terminal-notifier -message '' -title " & quoted form of result
    end tell
    

    如果您需要不断更新窗口,使用 GeekTool 之类的工具可能是更好的选择。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-13
      • 1970-01-01
      • 2019-01-24
      • 2023-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多