I am looking for a way to assign a keyboard shortcut to clear all the tracks from Up Next queue of iTunes. Does anyone know a way to do this?
Using Mac OS X Mountain Lion 10.8.4
This following script will work on OSX < 10.7.
So here's a complete answer :
For iTunes 11 & OS X 10.6 (iTunes 11 requires at least 10.6.8) :
For OS X 10.7 and above:
For the up next menu iTunes 11 uses an NSPopover which is available in OS X v10.7 and later. Therefore the hierarchy of UI Elements is different from the case above.
On iTunes 11.0.5, there is a bug where the button opening the Popover has no children. Therefore it is NOT possible to access the content of the popover to click on the clear button using Applescript.
I found a way to do it on Mac OS X Mountain Lion 10.8. it uses
This works for me on a 15 inch macbook pro retina running at 1440x900@2x
To use the script either use the instructions by Matthieu Riegler for a global shortcut or use it from the command line
also a script for the mini player assumes that the up next list is closed