In iTunes 12 on macOS, how can I reset the skip count of a song?
This following AppleScript code works for me using the latest version of macOS Mojave.
tell application "iTunes"
tell its track "Insert Your Song Title"
set its skipped count to 0 -- Enter Your Desired Number
end tell
end tell
The following code addresses the issue of multiple songs with the same name.
tell application "iTunes"
set theTrack to "Insert Your Song Title"
set tracksRef to a reference to (tracks whose name is theTrack)
set trackCount to count of tracksRef
if trackCount is greater than 1 then
set theArtists to artist of tracksRef
set chooseArtist to (choose from list theArtists with title "Choose The Artist" with prompt ¬
"Choose The Artist" OK button name "OK" cancel button name "Cancel") as text
tell (every track whose name is theTrack and artist is chooseArtist)
set skipped count to 0 -- Enter Your Desired Number
end tell
else
tell its track theTrack
set its skipped count to 0 -- Enter Your Desired Number
end tell
end if
end tell
This following code should work if you want to reset skipped count of every track.
tell application "iTunes"
set allTracks to every track
repeat with i from 1 to count of allTracks
set thisItem to item i of allTracks
tell thisItem
try
set its skipped count to 0 -- Enter Your Desired Number
end try
end tell
end repeat
end tell
I noticed in the comment to your OP where you answered "Selected tracks" to dwightk's comment questions "All tracks? Or selected tracks?" So...
To reset the Skips count of all selected tracks, simply use:
tell application "iTunes" to set skipped count of selection to 0