INTERACT FORUM

Windows => Plug-in Development => Topic started by: SBrandsborg aka Mouseman on September 27, 2003, 05:49:53 am

Title: labels in VB
Post by: SBrandsborg aka Mouseman on September 27, 2003, 05:49:53 am
hi
whats the easyest way to rename a label to the title mc is playing???

Title: Re: labels in VB
Post by: KingSparta on September 27, 2003, 06:44:55 am
I dont understand the question
Title: Re: labels in VB
Post by: SBrandsborg aka Mouseman on September 27, 2003, 06:50:44 am
if i make a
Code: [Select]

label1.caption = (SOMETHING)



SOMETHING shall be the title of the playing song
Title: Re: labels in VB
Post by: KingSparta on September 27, 2003, 07:00:50 am
oh

I don't think there is a direct way in doing this

I do not remember how it can be done but i know it can be.

if you remember someone made a "Listening to:" plug-in and i asked him how he did it and he told me but i lost the message.
Title: Re: labels in VB
Post by: SBrandsborg aka Mouseman on September 27, 2003, 12:35:05 pm
anyone?
i just need to know what command i need to get the title, artist etc on my plugin...

i cant find out the automation
hehe
i think its something like
MJFileAutomation.Name()
but i cant get it work :s
Title: Re: labels in VB
Post by: Soundman on September 29, 2003, 06:14:11 pm
Hi, Mouseman.  Try this....

cmjAutomation = 'whatever VB code you need to get ahold of a CMJAutomation COM object
curPlaylistAutomation = cmjAutomation.GetCurPlaylist()
curPlayingNowIndex = curPlaylistAutomation.Position() 'this is an integer
curFile = curPlaylistAutomation.GetFile(curPlayingNowIndex)  'Now you have a CMJFileAutomation object.
titleLabel.caption = curFile.Name()
artistLabel.caption = curFile.Artist()
albumLabel.caption = curFile.Album()
' etc. etc.


The above is untested code, as I do not use VB, but hopefully the idea is clear.

Regards,
Soundman
Title: Re:labels in VB
Post by: SBrandsborg aka Mouseman on November 10, 2003, 03:03:28 am
still haveing alot of problems.. i have looked abit at the busybox sdk
and come up with

    Dim MJCurPlaylist As MediaJukebox.MJCurPlaylistAutomation
    Set MJCurPlaylist = g_MJ.GetCurPlaylist
        ' get the file
        Dim MJFile As MediaJukebox.MJFileAutomation
        Set MJFile = MJCurPlaylist.GetFile(z)
   Label1.Caption = MJFile.Name



but its not what i need... i need it to display what song im playing right now..


Thanks soundman BUT i cant undestand your code hehe :s
Title: Re:labels in VB
Post by: nila on November 10, 2003, 05:15:33 am
It's pretty easy to do :)

Have a look at the Example (BusyBox) for how to get the info on the playing now tracks.

Then just assign the name of the file to the label.

Title: Re:labels in VB
Post by: SBrandsborg aka Mouseman on November 10, 2003, 07:17:02 pm
can anyone make an exampel?