Any way to add functionality to delete the currently playing song? I have a very similar script that works for winamp (v 5.61), and all it's missing for iTunes is an ability to get the location of the song back from the API
Code:
^+d::
WinGet, uniqueID, ID, A
ClipStore := ClipboardAll ; Save the entire clipboard to a variable of your choice.
Clipboard =
Send, ^!+/ ; This is the part I'm talking about. I set the Ctrl+Alt+Shift+"/" hotkey in Winamp's Global HotKeys to the function "Copy file path (unicode)" which sets the path of the currently playing file to the clipboard. How can this be replicated in iTunes?
ClipWait
PostMessage, 0x111,40048,,,ahk_class Winamp v1.x ; Plays next song
FileRecycle, %Clipboard%
IfWinExist, ahk_class BaseWindow_RootWnd ; This will clear the deleted songs from the playlist in the background
{
WinActivate, ahk_class BaseWindow_RootWnd
ControlClick,,, Playlist Editor
Send, {Alt Down}{DEL}{Alt Up}
}
WinActivate, ahk_id %uniqueID%
Clipboard := ClipStore ; Restore the original clipboard. Note the use of Clipboard (not ClipboardAll).
ClipStore = ; Free the memory in case the clipboard was very large.
return