Having a small problem with label showing text and winamp song. Line is "---winamp off----[winampsong]".
Scrolls the song but the 'winamp off'o shows.
Anyone know how i can fix this?
whatever u write inside the quotes will be displayed always. so both of them are showing. so if u dont want to show winamp off remove it and it wont display it. but if u want to show winamp off when its off and display only the song when winamp is on... u will need some extra editing... some ifelse or literunner.... etc etc
Here's a method that might work for ya.
Edit the actual *image* for the bounding box that the label sits in. (I'm just assuming you have your label mounted into an LsBox or a SkinBox instead of just sitting on the desktop)
For the LsBox/SkinBox image, put the text "--winamp off--" down as part of the image itself.
Make sure the background image for the label is still the blank background.
In your label definition, use this:
"[hideIfEmpty([winampSong])]"
The result will be that the winamp song title box will *always* say "---winamp off---" but if winamp is loaded with a song title, the song title label will show itself, covering the "---winamp off---" text up with the label's bg image. The label will then put the song title text over top of the bg image and everything will be splendid :)
If winamp is closed, the label will become empty and hide itself, thus making the "---winamp off---" text visible :)
If you have the label displayed on the desktop instead of a bounding box, there's a little more to it. For that, you'd have to use 1 of 2 methods:
1) (the easy one) .. Create an LsBox the same size as the label with the same placement as the label. Use an image that's pure Magic Pink, with "---winamp off---" in whatever color you want. (NOTE: Don't anti-alias the text on magic pink or you'll end up with half-pink anti-aliasing that doesn't get turned transparent). Next, mount the label into that LsBox and use the same method as outlined before.
2) Create a second label with the same placement and size as the first, and have the text of this one be "---winamp off---" and the text of the first one be "[hideIfEmpty([winampSong])]". Have the winampSong label be hidden by default. Get subclass.dll and apply it to the winampSong label in such a way that when the winampSong label hides itself (itd be something like WinampLabelWindowOnHide), trigger !WinampInactiveLabelShow. When the winampSong label shows itself, trigger !WinampInactiveLabelHide. (This is presuming your "---winamp off---" label is named WinampInactiveLabel)
Method #2 is tidier than method #1, but both will get the job done :)
or, you could use xlabel instead, and do this:
WinampLabelText "[if(winampPlaying)][winampsong][else]---winamp off---[endIf]"
edit: hmmm... showing winamp off whenever it is playing wouldnt really do much for you, would it?