Posted by member 212670 on 2006-01-16 21:12:03 link

That's because you can't, other than something like:

IF whatever = #
LabelOnLeftClick !thisbang
ELSE
LabelOnLeftClick !thatbang
ENDIF

Even then, that's only read on a !recycle (or a !reload).

Bangs need an event to fire (or some scripting setup).

The easiest way to do what you want is to have some var in a themevars, representing the amount of opacity, and having the label use the var for recycles.

Like in a themevar.rc:

trans 255

Label Definition:

LabelAlphaTransparency $trans$

A popup bang example:

*Popup "Set to 150" !execute [!xTextReplace @the file@ @trans *@ @trans 150@][!LabelSetAlpha thelabel 150]

If you want to see some live examples, using a slider, check out my RGB theme, and scroll down to the "Transparency" section of the script.rc.

(Btw, I think the new test builds are changing this to work the way you want.)