Как я могу вызвать уведомление о Рычании о в настоящее время играющем треке iTunes?

Я хотел бы, чтобы горячая клавиша сказала (спросите вежливо), Рычание для подбрасывания уведомления о том, что в настоящее время играет в iTunes.

Я ввел по абсолютному адресу вокруг немного, но не мог найти ответ "там".

Какие-либо мысли?

3
задан 23.08.2009, 02:37

4 ответа

Если Вы предпочитаете формат, который предоставляет GrowlTunes, можно также создать сценарий, который использует его:

tell application "GrowlTunes" to show current track
2
ответ дан 07.12.2019, 23:19

Мой взломанный Applescript, отправленный ниже. Это соответствует выводу Рычания iScrobbler. Благодаря Щупальцу для работы! Существует информация о том, как установить Quicksilver для запуска сценария здесь.

tell application "GrowlHelperApp"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to {"iTunes Playing Track"}
-- Make a list of the notifications
-- that will be enabled by default.
-- Those not enabled by default can be enabled later
-- in the 'Applications' tab of the growl prefpane.
set the enabledNotificationsList to {"iTunes Playing Track"}
-- Register our script with growl.
-- You can optionally (as here) set a default icon
-- for this scripts notifications.
register as application "Growl iTunes Notification" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "iTunes"

set title_text to "Null"
set body_text to ""
set body_temp to ""
set has_artwork to false

tell application "iTunes"
    if player state is playing then
        set trck to current track

        if artworks of trck is not {} then
            get artwork 1 of trck
            set pic to data of result
            set has_artwork to true
        end if

        set title_text to "Now Playing"

        get name of trck
        set body_text to "Track: " & result

        get rating of trck
        set rate to result / 20

        repeat rate times
            set body_temp to body_temp & "★"
        end repeat

        if rate is less than 5 then
            repeat (5 - rate) times
                set body_temp to body_temp & "☆"
            end repeat
        end if

        set body_text to body_text & " (" & body_temp & ")" & return

        get album of trck
        set body_text to body_text & "Album: " & result & return

        get artist of trck
        set body_text to body_text & "Artist: " & result

    end if
end tell

if has_artwork then
    notify with name "iTunes Playing Track" title title_text description body_text application name "Growl iTunes Notification" pictImage the pic
else
    notify with name "iTunes Playing Track" title title_text description body_text application name "Growl iTunes Notification" image from location "file:///Users/drewbeck/Library/Scripts/Custom/no_album.tiff"
end if 

конец говорит

3
ответ дан 07.12.2019, 23:19

Вам нужен плагин для iTunes.Вот.

2
ответ дан 07.12.2019, 23:19

Можно использовать applescript для этого (не помните, где я получил это) - я компилирую это в приложение, инициированное Quicksilver, для получения немедленного оповещения того, что играет, когда я хочу, сохраняя iTunes минимизированным в любом случае:

growl

 tell application "GrowlHelperApp"
    -- Make a list of all the notification types
    -- that this script will ever send:
    set the allNotificationsList to {"iTunes Playing Track"}
    -- Make a list of the notifications
    -- that will be enabled by default.
    -- Those not enabled by default can be enabled later
    -- in the 'Applications' tab of the growl prefpane.
    set the enabledNotificationsList to {"iTunes Playing Track"}
    -- Register our script with growl.
    -- You can optionally (as here) set a default icon
    -- for this scripts notifications.
    register as application "Growl iTunes Notification" all notifications allNotificationsList default notifications enabledNotificationsList icon of application "iTunes"

    set title_text to "Nothing playing"
    set body_text to ""
    set has_artwork to false

    tell application "iTunes"
        if player state is playing then
            set trck to current track

            if artworks of trck is not {} then
                get artwork 1 of trck
                set pic to data of result
                set has_artwork to true
            end if

            get name of trck
            set title_text to result

            get time of trck
            set title_time to result
            set body_text to title_time & " =["

            get rating of trck
            set rate to result / 20

            repeat rate times
                set body_text to body_text & " ❤ "

            end repeat

            get artist of trck
            set body_text to body_text & "]   ❧ " & result

            get album of trck
            set body_text to body_text & " ⇒ " & result

        end if
    end tell

    if has_artwork then
        notify with name "iTunes Playing Track" title title_text description body_text application name "Growl iTunes Notification" pictImage the pic
    else
        notify with name "iTunes Playing Track" title title_text description body_text application name "Growl iTunes Notification"
        "iTunesLibraryPlaylistIcon.icns"
    end if

end tell
1
ответ дан 07.12.2019, 23:19

Теги

Похожие вопросы