I use
MouseTools<http://www.hamsoftengineering.com/codeSharing/MouseTools/MouseTools.html>and
TotalSpaces <http://totalspaces.binaryage.com> (with no transitions when
switching spaces set, yay no more of swoosh animation!) to make it work as
fast as possible.
It takes about .3-.7 sec per song to add to on top or bottom of the Up Next
queue depending on whether you use 'Add to Up Next' or 'Play Next' on a
specced mid-2012 MBA.
>From your front application it switches to iTunes, tries to get your
playlist view, does the clicking to add each song to the queue, puts the
first song queued in iTunes' LCD display if there's none or if it's
feasible, tries to restore your playlist view and switches back to the
application you were at.
Tested in iTunes 11.0.4, QS b4000 with iTunes Plugin 2.3.4, OS X 10.8.4.
YMMV, so tweak it as you'll probably need to.
*using terms from* *application* "Quıcĸsıɩⅴεʀ"
*on* *get direct types*
*return* {"com.apple.itunes.track"}
*end* *get direct types*
*on* *open files* TheTracks
*set* TheTracks *to* TheTracks *as* *list*
*tell* *application* "System Events" *to* *set* FrontAppName *to* name *of*
*first* *process* *where* frontmost *is* true
*tell* *application* "iTunes"
*try*
*set* myPlaylist *to* name *of* view *of* *front* *window*
*end* *try*
*repeat* *with* i *from* 1 *to* *count* TheTracks
*set* SelTrack *to* (*add* *item* i *of* TheTracks)
*reveal* *playlist* "Purchased"
*activate*
*tell* *application* "System Events" *to* *tell* *process* "iTunes" *to* *
tell* *text field* 1 *of* (*first* *row* *whose* value *is* *not* *null*) *
of* *outline* 1 *of* *scroll area* 1 *of* *splitter group* 1 *of* *splitter
group* 1 *of* *window* 1 *to* *set* {x, y} *to* position
*reveal* SelTrack
*do shell script* "MouseTools -x " & (x + 5) & " -y " & (y + 5) & "
-controlKey -leftClick" -- context menu
*tell* *application* "System Events" *to* *keystroke* "Add to Up Next" &
return
--tell application "System Events" to keystroke "Play Next" & return
*tell* *application* "System Events" *to* *key code* 115 -- Home
*end* *repeat*
*tell* *application* "System Events" *to* *tell* *process* "iTunes" *to* *
tell* *window* 1 *to* *tell* *scroll area* 1
*if* *not* (*static text* 3 *exists*) *and* *not* ((*every* *button* *whose*
value *of* *attribute* "AXDescription" *contains* "view") *exists*) *then* *
tell* *application* "iTunes" *to* *next track*
*end* *tell*
*try*
*set* view *of* *front* *window* *to* *playlist* myPlaylist
*end* *try*
*end* *tell*
*activate* *application* FrontAppName
*end* *open files*
*end* *using terms from*
--
You received this message because you are subscribed to the Google Groups
"Quicksilver" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/blacktree-quicksilver.
For more options, visit https://groups.google.com/groups/opt_out.