Can this help?
Code:
#Persistent
IniRead, vol_Step, %A_SCRIPTDIR%\Finderbar_Engine.ini, SoundVolume, Step, 4
IniRead, vol_DisplayTime, %A_SCRIPTDIR%\Finderbar_Engine.ini, SoundVolume, DisplayTime, 2000
IniRead, vol_BackgroungPic, %A_SCRIPTDIR%\Finderbar_Engine.ini, SoundVolume, BackgroungPic
IniRead, vol_Transparency, %A_SCRIPTDIR%\Finderbar_Engine.ini, SoundVolume, Transparency, 200
IniRead, vol_UpHotkey, %A_SCRIPTDIR%\Finderbar_Engine.ini, SoundVolume, VolumeUpHotkey, #Up
IniRead, vol_DownHotkey, %A_SCRIPTDIR%\Finderbar_Engine.ini, SoundVolume, VolumeDownHotkey, #Down
HotKey, %vol_UpHotkey%, vol_MasterUp
HotKey, %vol_DownHotkey%, vol_MasterDown
Menu,Tray, Add, Mute Sound, Mute
Menu,Tray, Default, Mute Sound
SetTimer, WatchSound, 500
return
Mute:
SoundSet, +0, , Mute
Return
WatchSound:
SoundGet, vol_Mute, , Mute
If vol_Mute = On
{
Menu, Tray, Check, Mute Sound
Menu, Tray, Icon, %A_ScriptDir%\images\Volume0.ico
Return
}
IfEqual, vol_Mute, Off, Menu, Tray, Uncheck, Mute Sound
SoundGet, vol_Master, Master
If vol_Master < 1
Menu, Tray, Icon, %A_ScriptDir%\images\Volume0.ico
If vol_Master between 1 and 20
Menu, Tray, Icon, %A_ScriptDir%\images\Volume1.ico
If vol_Master between 20 and 50
Menu, Tray, Icon, %A_ScriptDir%\images\Volume2.ico
If vol_Master > 50
Menu, Tray, Icon, %A_ScriptDir%\images\Volume3.ico
Return
vol_ShowBars:
IfWinNotExist, %A_ScriptName%
{
Gui, 3:Add, Pic, x0 y0 w213 h208, %A_ScriptDir%\%vol_BackgroungPic%
Gui, 3:Add, Progress, x35 y160 w144 h12 -Smooth, 50
Gui, 3:+ToolWindow
DetectHiddenWindows, On
WinWait, %A_ScriptName%
WinSet, TransColor,0000FF %vol_Transparency%
WinSet, AlwaysOnTop, On, %A_ScriptName%
Gui, 3:-Caption
Gui, 3:Show, h208 w213
}
SoundGet, vol_Master, Master
GuiControl, 3:, msctls_progress321, %vol_Master%
SoundPlay, %A_ScriptDir%\images\sound.wav
SetTimer, vol_BarOff, %vol_DisplayTime%
Return
vol_BarOff:
transparent =%vol_Transparency%
SetTimer, vol_BarOff, off
Loop, %transparent%
{
transparent -= 1
WinSet, TransColor, 0000FF %transparent%, %A_ScriptName%
}
Gui, 3:Destroy
Return
vol_MasterUp:
SoundSet, +%vol_Step%
Gosub, vol_ShowBars
Return
vol_MasterDown:
SoundSet, -%vol_Step%
Gosub, vol_ShowBars
Return
Based on the code by Rajat and Tekl
Please start this script only when Editors window with this script is
closed
Images are here:
http://landvermesser.tripod.com/volume.html