Download Consider Unpausing for Alfred Powerpack. Basically I often pause iTunes to, for example, watch a quick clip on YouTube and then I forget to unpause and spend the next hour in silence. Now I just type cons into Alfred and after 5 minutes I get this notification:
You can also specify a number of minutes until you are reminded. If you don’t enter anything then 5 minutes will be used.
I’d like to intelligently map this behavior to my play/pause button instead of to an alfred shortcut, so that when I pause music with f9 it reminds me in 5 minutes. most importantly, the script would not need to be triggered if I press f9 to START music at first/again
any tips?
I’ve just had a look into this for one minute and I can get the script to run with an F-key using FastScripts (http://www.red-sweater.com/fastscripts/) which is free for up to 10 shortcuts. I’ll change the script when I have a spare few minutes so that if iTunes is paused, it’ll start playing. Note that this will all stop the F-key working with other apps like VLC or Spotify.
After messing around a little more, I successfully mapped the extension to F8 with Alfreds built in hotkey preferences and it’s almost working perfectly. Now all that I’m needing is for the script to not trigger when iTunes is already playing…
I’m using a combination of FunctionFlip and SizzlingKeys to get growl notifications for iTunes song activity. I have the F7,8 and 9 keys ‘flipped’ and then mapped in sizzling keys to prev/play/next. SizzlingKeys then has its own prefs inside growl.
In order to set F8 as the hotkey in alfred, I first deactivated SizzlingKeys, set the hotkey and then reactivated sizzling keys. The script triggers along with iTunes, but the 5 minute growl pops up even if iTunes is playing.
what if the script checked to see if iTunes was playing after the 300 count, and ended if true?
I think I got it, script below. I’m not too experienced in AppleScript – after that ‘end if’ do I need something else to clear the script process? I don’t want it to be stuck in a loop of some sort…
on alfred_script(q)
tell application “iTunes”
pause
end tell
delay 300
tell application “iTunes”
if player state is paused then
tell application id “com.Growl.GrowlHelperApp”
set the allNotificationsList to ¬
{“Consider Unpausing”}
set the enabledNotificationsList to ¬
{“Consider Unpausing”}
register as application ¬
“Growl AppleScript Sample” all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application “iTunes”
notify with name ¬
“Consider Unpausing” title ¬
“Consider Unpausing” description ¬
“Don’t you love your music?” application name “Growl AppleScript Sample”
end tell
end if
end tell
end alfred_script
Looks find but does that play if iTunes is paused? Anyways just re-download from the original link, version 2 should act as expected 🙂
yeah, something within my setup (functionflip or sizzlingkeys) was taking precedence over that first statement. After removing it though, everything still works perfectly. Lovin this extension! Thanks a lot
Thanks for this extension! I use itunes to listen to streaming radio as well, and doesn’t seem to be a pause action streaming… only stop. I’m not much of an applescripter, but some googling tells me it might not be easy, but might be possible to detect if the currently playing item is streaming (perhaps by checking if the track length is continuous?) and then stop it rather than pause. Then for the reminder I assume play action would work the same way.
I’ve had a go, but failed…
As far as I can tell you can’t pause streaming radio. I’m not just talking about AppleScript, but in iTunes as well. I assume that this is a legality of recording songs from the radio issue.
0 Pingbacks
Recent Posts