现在在AppleScript中播放窗口

现在在AppleScript中播放窗口,applescript,itunes,Applescript,Itunes,我想知道如何使用脚本实用程序制作脚本,当单击该实用程序时,将返回一个窗口,显示iTunes中播放的歌曲的名称和艺术家。对AppleScript来说非常陌生,并且花了一个小时试图让它工作,但没有成功 谢谢, Nathan有一个当前曲目属性: tell application "iTunes" tell current track to artist & " - " & name display dialog result --do shell script

我想知道如何使用脚本实用程序制作脚本,当单击该实用程序时,将返回一个窗口,显示iTunes中播放的歌曲的名称和艺术家。对AppleScript来说非常陌生,并且花了一个小时试图让它工作,但没有成功

谢谢,
Nathan

有一个
当前曲目
属性:

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之类的工具可能是更好的选择