10

Save the script cog06.scpt and adjust the file path in the geeklet to where cog06.scpt is stored on your local machine.

The contents of the script:

global output
tell application "System Events"
    set myList to (name of every process)
end tell
if (myList contains "Cog") is true then
    tell application "Cog"
        if (exists artist of the currententry) then
            set this_artist to (get artist of the currententry)
        else
            set this_artist to " ?"
        end if
        if (exists title of the currententry) then
            set this_title to (get title of the currententry)
        else
            set this_title to "dunno"
        end if
    end tell
    set output to "currently playing: " & this_title & " by " & this_artist
else
    set output to "Cog not running"
end if
do shell script "echo " & quoted form of output

Geeklet files to download

Comments

Log in to comment or register here.