Color coding text

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey.

Moderator: Gurus

Eonsv
Posts: 3
Joined: Wed Apr 03, 2013 10:02 am

Color coding text

Post by Eonsv » Wed Jan 21, 2015 10:27 am

Hello,
Do anyone know if it is possible, through scripting, to modify the color of the text individually for each song? Ideally I'd like to write a script which changes the text of the songs in the now playing field according to each songs genre. An alternative would be to change the background of each song, if its not possible to change the text color.

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Color coding text

Post by trixmoto » Sun Jan 25, 2015 5:55 pm

Yes, this is possible. It's undocumented, but you can just use the "Color" method, like this...

Code: Select all

  Set list = SDB.CurrentSongList
  For i = 0 To list.Count-1
    Set itm = list.Item(i)
    itm.Color = 8421504
  Next
I can't remember how the value works exactly, but the example I've given is grey (the same as if a track is inaccessible) and it's 0 for black.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

trixmoto
Posts: 10024
Joined: Fri Aug 26, 2005 3:28 am
Location: Hull, UK
Contact:

Re: Color coding text

Post by trixmoto » Sun Jan 25, 2015 6:05 pm

I've just scanned back through my emails and the number is an integer worked out by first getting the RRGGBB hex code (like you would for HMTL) and then converting the hexidecimal into decimal.
Download my scripts at my own MediaMonkey fansite.
All the code for my website and scripts is safely backed up immediately and for free using Dropbox.

Eonsv
Posts: 3
Joined: Wed Apr 03, 2013 10:02 am

Re: Color coding text

Post by Eonsv » Fri Jan 30, 2015 1:06 pm

Thanks a lot for the help! :)

Post Reply