Put active song name into widget text label

Hey guys, I’m back at it again with another question! :sweat_smile:
I’m trying to have a widget text label update when I switch a song.
This is what I tried:


It does add the song name to the text label like I want, but it doesnt update any song name changes unless I re compile the script. I tried a few things (written in the bottom half of the script), but I could use some help from someone who isn’t as bad at this as I am :smiley:

2 things to keep in mind:

  1. The initialization callback happens once only. That’s why the first part of the script works only when you re-compile. The first time is the only time those lines are going to work the way you want.

  2. Scripts are tied to the rackspaces themselves. So, make sure you add the script to each rackspace that you want those scripted items to operate on.

1 Like

You’re also going to want to call that updateLabel from On Activate

1 Like

And this is an example

Var
   Song : Widget

// Called when rackspace is activated
On Activate
 SetWidgetLabel(Song, GetCurrentSongName())
End
4 Likes

Marvelous!
Here’s a small extension to prevent a script log pop-up when not in setlist mode, and use of rackspace name instead, then.
A work around as long as we can’t increase the font size for the song names in this view :slight_smile:

Var
Song : Widget

// Called when rackspace is activated
On Activate
If InSetlistMode()
Then
SetWidgetLabel(Song, GetCurrentSongName())
Else
SetWidgetLabel(Song, GetRackspaceName())
End
End

4 Likes