LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hot to change the Songnumber of the WMP using a WMP-Class?

I am working with the Windows Media Player in LabVIEW - so far so good. I know how to load a playlist (using the URL Method or Class). Afterwards I can play the songs and switch to next one using the WMP itself. I also know how to read all the Songs which are on the playlist (using the IWMPMediaClass->sourceURL).

 

Situation:I am playing song number 1, and want to switch now to songnumber 4

Question: How do I do that if I only have the number (f.e. an I32 value). Is it possible to tell WMP which songnumber (of the loaded playlist) to play? If yes, which Method or Class do I have to use?

 

I am very thankfull for any help!

LabVIEW 2011
0 Kudos
Message 1 of 4
(2,494 Views)

Post up the code you are working with so far. There probably is a invoke method that you can use to change the song but I'm not familiar with WMP to know for sure.

0 Kudos
Message 2 of 4
(2,488 Views)

Here is my code. It is basicaly a small DJ pult with 2 separate WMP (one left and one right). Through the buttons "LADEN" (means Load in german), u can load a WMP Playlist to one or the other WMP. After the loading, u can see the playlist displayed in a list object. With the top down slider, u can adjust the volume towards one of the WMPs. When I doubleclick one of the elements of the Playlist, it delivers me an I32 number which is corresponding with the double-clicked songname. I want now to tell the WMP to play this songnumber. This should happen in the event-cases 4 and 5 (4 for the left WMP and 5 for the right WMP).

 

I hope I was able to explain my code. It is not the best since I am a beginner, but it works!

 

 

LabVIEW 2011
0 Kudos
Message 3 of 4
(2,468 Views)

Is there realy nobody who can help me? Please help!

LabVIEW 2011
0 Kudos
Message 4 of 4
(2,437 Views)