Skip to content

Instantly share code, notes, and snippets.

@holin
Created August 26, 2012 09:27
Show Gist options
  • Save holin/3476591 to your computer and use it in GitHub Desktop.
Save holin/3476591 to your computer and use it in GitHub Desktop.
Jing+ Music Play Next AppleScript
-- 参考 http://hints.macworld.com/article.php?story=20110622061755509
on run
tell application "Safari"
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
set tabtitle to (get name of currTab as string)
if (tabtitle contains "Jing+ Music") then
set musicTab to currTab
end if
end try
end repeat
tell musicTab to do JavaScript "Player.next()"
end tell
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment