Jump to content

Constantly update slider?


Rad
 Share

Recommended Posts

For that program I made, I want the slider to constantly update the color when you are moving the slider. I have it setup now, except it only updates when you release the slider (GUIGetEvent doesnt seem to detect its movement)

How could I go about this? I only need to run a setup func when your moving it thats all fine I just dont know how to detect when your selecting it...

Link to comment
Share on other sites

maybe this can help

#include <GuiConstants.au3>

GUICreate("my GUI")

$T_Volume = GUICtrlCreateSlider(20, 135, 200, 30)
GUICtrlSetLimit(-1, 100, 0)
GUICtrlSetCursor(-1, 0)
$level = "50" 
$save_level = $level
GUICtrlSetData($T_Volume, $level)

GUISetState()

While 1
    
    $msg = GUIGetMsg()
    If $msg = $GUI_EVENT_CLOSE then Exit
    
    If $level <> GUICtrlRead($T_Volume) Then
        $level = GUICtrlRead($T_Volume)
        ToolTip($level)
        SoundSetWaveVolume($level)
    EndIf
    
WEnd

8)

NEWHeader1.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...