[REQUEST] Show again currently playing track

Discuss Play, an open source multi-format audio player.
Post Reply
bichenoubi
Posts: 29
Joined: Fri Oct 12, 2007 2:13 am

[REQUEST] Show again currently playing track

Post by bichenoubi » Wed Nov 07, 2007 4:06 am

I just want a simple hot key to show again in Growl what is the currently playing track as it does automatically when the track begins.
Thank you

sml
Posts: 2
Joined: Thu Nov 15, 2007 2:12 am

Re: [REQUEST] Show again currently playing track

Post by sml » Thu Nov 15, 2007 2:22 am

some applescript and your favorite hot key binder (I prefer Quicksilver)

Code: Select all

tell application "Play"
	set nowPlaying to now playing of library
	set t to title of nowPlaying
	set a to artist of nowPlaying
	tell application "GrowlHelperApp"
		-- reuse Play.app's growl notifier  
		notify with name "Track Playback Started" title t description a application name "Play"
	end tell
end tell

bichenoubi
Posts: 29
Joined: Fri Oct 12, 2007 2:13 am

Re: [REQUEST] Show again currently playing track

Post by bichenoubi » Tue Nov 20, 2007 2:13 am

wow, thank you !

Edit: I installed Quicksilver, but I don't know how to bind the script to it.
Thanks again

bichenoubi
Posts: 29
Joined: Fri Oct 12, 2007 2:13 am

Re: [REQUEST] Show again currently playing track

Post by bichenoubi » Tue Nov 20, 2007 3:37 am

Ok, I think I figured it out.

I need to save the file of the applescript somewhere, and then assign a trigger to execute that file. Right ?
Is there a way to assign a trigger to some applescript commands directly in QS without creating an applescript file?

Thank you

sml
Posts: 2
Joined: Thu Nov 15, 2007 2:12 am

Re: [REQUEST] Show again currently playing track

Post by sml » Tue Nov 20, 2007 5:21 am

bichenoubi wrote: I need to save the file of the applescript somewhere, and then assign a trigger to execute that file. Right ?
Yes -- best place to save it is ~/Library/Scripts/ -- be sure to give it a descriptive name.
bichenoubi wrote: Is there a way to assign a trigger to some applescript commands directly in QS without creating an applescript file?
Not as far as I know. Sorry.

But Quicksilver can execute arbitrary Applescript at it's prompt. For example, copy the above applescript to the clipboard and:

^-Space (or whatever your hotkey is)
[Current Clipboard Object]
[Run as Applescript]

Quicksilver should execute the applescript in place.

bichenoubi
Posts: 29
Joined: Fri Oct 12, 2007 2:13 am

Re: [REQUEST] Show again currently playing track

Post by bichenoubi » Sun Nov 25, 2007 4:59 am

I modified your script a bit to include album title.
But, is there a way to modify what Play is sending to Growl (where is the Play script that tells what to send to Growl?), because album title is only inluded in my script, not in the one of Play.

So, Play should not only include a builtin hot key to show again the currently playing track, it would be cool if it also included a little input in the preferences to set the pattern of info to send to Growl. It could be done in the same way that max ask for the pattern of folder and file name to create from info of the tags. eg: "%title - %artist %r %album". %r would be a return carriage.

Thank you

Post Reply