Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.6: Create global hotkeys to control Google Music playback' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.6: Create global hotkeys to control Google Music playback
Authored by: emale on Sep 26, '12 01:45:51AM
Exactly what I've searched for.

Safari useres also have to change another part of the code: It's "do javascript" instead of "execute javascript".
Also reduced the code a little bit and made it checking the URL instead to the tab title. Seems to be more reliable.
It looks like that:

tell application "Safari"
	set allTabs to (every tab of every window)
	set allTabs to item 1 of allTabs --don't ask me why but otherwise it didn't work. Maybe it's a problem with a extension for me
	repeat with currTab in allTabs
		set theURL to (URL of currTab) as string
		if "play.google.com/music" is in theURL then tell currTab to do JavaScript "SJBpost('playPause');" --or  nextSong or prevSong
	end repeat
end tell


[ Reply to This | # ]
10.6: Create global hotkeys to control Google Music playback
Authored by: Windgazer on Nov 26, '12 02:18:37PM

Since I've recently started gathering what scripts I make use of and try to clean them as much as I can I based some script for working with Google Play on the comments out here and published them on github.

If any of you find them of use, or can make improvements, fork away!! (BTW, I've just finished creating a growl script that shows song-title, artist and album-art...)



[ Reply to This | # ]