Fixing stuff and maybe other things.

In iTunes 10, you could skip to the next/previous track when Repeat One was turned on. In 11 & 12, they assume that by “skip ahead”, you somehow mean “rewind this track”.

This really bothers some people.Do not judge us, we have our reasons!

And here’s one way to fix it.

It took some work, but I finally came up with some AppleScript to handle this. Basically, we’re checking to see if Repeat One is on. If it is, we quickly disable it, skip to the next (or previous) track, and then turn it back on. Apple borked the old way of doing this (same with shuffle), so we’re using menu bar items instead.

-- This script lets you skip songs in iTunes 11/12 even if repeat one is on
tell application "System Events"
tell process "iTunes"
-- Find out if repeat one is on
-- This finds out if the menu item is checked
set isRepeatOneOn to (value of attribute "AXMenuItemMarkChar" of menu item 3 of menu 1 of menu item "Repeat" of menu 1 of menu bar item "Controls" of menu bar 1 as string) ≠ ""
if isRepeatOneOn is true then
-- Set repeat to ALL
click menu item 2 of menu 1 of menu item "Repeat" of menu 1 of menu bar item "Controls" of menu bar 1
-- Skip to previous track...
click menu item "Previous" of menu 1 of menu bar item "Controls" of menu bar 1
-- Need this, or the next step happens too fast
delay 0.1
-- Reactivate Repeat One
click menu item 3 of menu 1 of menu item "Repeat" of menu 1 of menu bar item "Controls" of menu bar 1
else
-- Just skip to previous track
click menu item "Previous" of menu 1 of menu bar item "Controls" of menu bar 1
end if
end tell
end tell