--- edbro9 wrote:

> I have a button showing the volume (*info Vol:
> expr((volume*100)/255)%). Is there any way to toggle the color of
> that info text to maybe red if the volume is on mute? A script
> maybe?

This can be done with a script, with the knowledge of the button's
location on the bar and with the knowledge of the bar's name.

By writing a script named, for instance, VolumeButton.PowerPro and
changing the button's label to this:

*Info expr(.VolumeButton)

We have a script that will be run every one or two seconds while the
button is visible, and we can control what text will be displayed on
the button from this script.

>From this script we could change the colour of the button text using
the CL.SetTextColor function.

Try this out for size:

; --- VolumeButton.PowerPro

Local BarName = "MyBar"
Local ButtonIndex = 0

; The button index is zero-based, so the first button on the bar has
; an index of zero; the next has an index of 1; etc.

If(Volume == 0) Do
    CL.SetTextColor(BarName, ButtonIndex, 255, 0, 0)
Else
    CL.SetTextColor(BarName, ButtonIndex, 0, 128, 0)
EndIf

Quit(((Volume * 100) / 255) ++ ?"%")

; --- VolumeButton.PowerPro

You do of course need to change the values of the BarName and
ButtonIndex variables accordingly.

--

Alex Peters / Melbourne, Australia
PowerPro v4.1.00 / Windows XP



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/JV_rlB/TM
--------------------------------------------------------------------~-> 

Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to