does anyone know how to clear a playlist using a script?
Announcement
Collapse
No announcement yet.
Clearing playlist
Collapse
This topic is closed.
X
X
-
I do it like this
Code:Sub ClearPlay(ByVal Data As Object) hs.Plugin("Media Player").musicApi.StopPlay() hs.Plugin("Media Player").musicApi.ClearCurrentPlaylist() End Sub
-
I get a little confused around playlists because there can be saved playlists and the current playlist (that I am not sure is saved anywhere but is what WMP is playing at the moment), that code clears the current playlist WMP has. There are other commands in the Music API like PlayListDeleteTrack/PlayListAddTrack that look to delete tracks from saved playlists.
Comment
-
It will depend on exactly what you are trying to do, you would stand a better chance of having a text box on the HSTouch page, when you highlight the box you have a text input option. You could then have another button that sent the value into another script and then created a new playlist. That is only creating a playlist though...adding tracks to it will be another headache entirely.
Comment
Comment