15. Januar 2016
This is a small example to use Apple Script with iTunes. It will give a Input Box for every selected song asking for a new play counter:
- Open The Script-Editor and paste the following script:
AppleScript1234567891011tell application "iTunes"set sel to selectionrepeat with t in selset trackname to the name of tset dialog_answers to display dialog "Enter a new play count for " & trackname & ":" default answer ""set newcount to text returned of dialog_answers as integerif button returned of dialog_answers is "OK" thenset played count of t to newcountend ifend repeatend tell
- Check if the following folder ~Library/iTunes/Scripts . If not create it.
- Save the Script in the Script-Editor to this Folder giving it the name Change Play Count.scpt .
- At once in the iTunes Menu Bar the Script symbol appears left next to the Help Menu. It has the Entry Change Play Count .
- Select as much songs as you like and click the script to change the the play count of the selected songs.