Jump to content

Recommended Posts

Posted (edited)

#include <GUIConstants.au3>
Opt("GuiOnEventMode", 1)
Opt("WinTitleMatchMode", 4)


$pig = GUICreate("100%", 200, 20)
GuiSetOnEvent($GUI_EVENT_CLOSE, "quit")
GUISetBkColor (123)
GuiSetState();Display gui

$s = GuiCtrlCreateSlider (0,0,200,20)
GUICtrlSetLimit($s,100,0)
GUICtrlSetData($s,100)

$p = 100
$last = 100

While 1
    Sleep(10)
    $p = GuiCtrlRead($s)
    If $last = $p Then
    Else
        SoundSetWaveVolume($p)
        WinSetTitle ( "handle=" & $pig , "", $p & "%" )
        WinSetTrans ( "handle=" & $pig , "", 155 + $p ); 155 + $p so the win will never be 0% transparency
        $last = $p
       ;MsgBox(0,"","Changed!"); Debuging
    EndIf
wend


Func quit()
Exit
EndFunc

Ok.

Edited by UP NORTH

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
  • Recently Browsing   0 members

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