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: kcee on Mar 15, '12 04:23:34PM

This is not working anymore. The tabs in google chrome now contains name of the song title and does not contain "Google Music" nor "Google Beta" so it is not getting detected. I was thinking keeping the google music tab on the first tab position might solve it but I am not sure how to go about modifying the existing AppleScript code given in the original doc.

Here is what I have:
on run
tell application "Google Chrome"
set allWins to every window
set allTabs to {}
repeat with currWin in allWins
set allTabs to allTabs & every tab of currWin
end repeat
repeat with currTab in allTabs
try
if ((characters -10 thru -1 of (title of currTab as string)) as string) = "Google Music" then set musicTab to currTab
end try
end repeat
tell musicTab to execute javascript "SJBpost('playPause');"
end tell
end run


Can anyone modify the AppleScript please?



[ Reply to This | # ]
10.6: Create global hotkeys to control Google Music playback
Authored by: drumdbeat on Apr 21, '12 02:46:26AM

on run
tell application "Google Chrome"
set allWins to every window
set allTabs to {}
repeat with currWin in allWins
set allTabs to allTabs & every tab of currWin
end repeat
repeat with currTab in allTabs
try
if ((characters -11 thru -1 of (title of currTab as string)) as string) = "Google Play" then set musicTab to currTab
end try
end repeat
tell musicTab to execute javascript "SJBpost('playPause');"
end tell
end run



[ Reply to This | # ]