1
Post New Requests Here / Re: IDEA: Volume buttons (and others) pressed on keyboard are displayed on scree
« on: August 18, 2006, 04:41 AM »
Hey I found another Volume OSD Script by a person called - Rajat but I can't find them in here it is a fairly good script but one problem I noticed is that when you press the volume up or down a ghost box appears in the middle of the screen can someone take a look at the code and see if there is a fix for this problem.
Thanks
Code-
Edited to wrap the script in [code] tags - lanux128
Thanks
Code-
;_________________________________________________
;_______Volume OSD Script - Rajat_______________
;_________________________________________________
;_________________________________________________
;_______User Settings_____________________________
;Make customisation only in this area
;change characters for empty & full bar here
Full = |
Empty = -
;set bar position here (relative to desktop)
setenv, PosX, 922
setenv, PosY, 720
;Customise Hotkeys here
;HotKey, Volume_Up, VolUp
;HotKey, Volume_Down, VolDn
;HotKey, ^#Up, wVolUp
;HotKey, ^#Down, wVolDn
HotKey, Volume_Up, VolUp ; ^Volume_Up
HotKey, Volume_Down, volDn
HotKey, +Volume_Up, wvolUp ; Shift+^Volume_Up
HotKey, +Volume_Down, wvolDn
;___________________________________________
;_____Auto Execute Section__________________
; DON'T CHANGE ANYTHING HERE!!
; (unless u know what u're doing)
SetFormat, float, 0.0
SetTimer, splashoff, 100
CoordMode, ToolTip, Screen
SoundGet, currsnd1
SetTimer, CheckMute, 100
;Building Empty Bar
Loop, 25
EmptyBar = %EmptyBar%%Empty%
Exit
Display:
IfNotEqual, Type, W, SoundGet, currsnd
IfEqual, Type, W, SoundGet, currsnd, Wave
if currsnd1 <> %currsnd%
{
IfNotEqual, Type, W, ToolTip, Vol %currsnd%`% %curr%, %PosX%, %PosY%
IfEqual, Type, W, ToolTip, Wave %currsnd%`% %curr%, %PosX%, %PosY%
currsnd1 = %currsnd%
}
Type =
setenv, presstime, %A_MDay%%A_hour%%A_Min%%A_Sec%
envadd, presstime, 2
SetTimer, SplashOff, On
return
Splashoff:
setenv, presstime2, %A_MDay%%A_hour%%A_Min%%A_Sec%
ifgreaterorequal, presstime2, %presstime%
{
ToolTip
SetTimer, SplashOff, off
}
return
;___________________________________________
;_____Hotkey Customisation Section__________
; User defined hotkeys here
wVolUp:
Type = W
VolUp:
#MaxHotkeysPerInterval 50
IfNotEqual, Type, W
{
SoundSet, +4
SoundGet, currsnd
}
IfEqual, Type, W
{
SoundSet, +4, Wave
SoundGet, currsnd, Wave
}
mark=0
curr=%EmptyBar%
loopup:
mark += 4
iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
iflessorequal,mark, %currsnd%, goto, loopup
gosub, display
return
wVolDn:
Type = W
VolDn:
#MaxHotkeysPerInterval 50
IfNotEqual, Type, W
{
SoundSet, -4
SoundGet, currsnd
}
IfEqual, Type, W
{
SoundSet, -4, Wave
SoundGet, currsnd, Wave
}
mark=0
curr=%EmptyBar%
loopdown:
mark += 4
iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
iflessorequal,mark, %currsnd%, goto, loopdown
gosub, display
return
;___________________________________________
;__________MUTE DETECTION BY COMPUBOY_R
CheckMute:
SoundGet,checkmute,,MUTE
if checkmute = On
{
TrayTip,Volume,MUTE,,1
mutetray = yes
}
else
{
if mutetray = yes
{
TrayTip
mutetray = no
}
}
return
;_______Volume OSD Script - Rajat_______________
;_________________________________________________
;_________________________________________________
;_______User Settings_____________________________
;Make customisation only in this area
;change characters for empty & full bar here
Full = |
Empty = -
;set bar position here (relative to desktop)
setenv, PosX, 922
setenv, PosY, 720
;Customise Hotkeys here
;HotKey, Volume_Up, VolUp
;HotKey, Volume_Down, VolDn
;HotKey, ^#Up, wVolUp
;HotKey, ^#Down, wVolDn
HotKey, Volume_Up, VolUp ; ^Volume_Up
HotKey, Volume_Down, volDn
HotKey, +Volume_Up, wvolUp ; Shift+^Volume_Up
HotKey, +Volume_Down, wvolDn
;___________________________________________
;_____Auto Execute Section__________________
; DON'T CHANGE ANYTHING HERE!!
; (unless u know what u're doing)
SetFormat, float, 0.0
SetTimer, splashoff, 100
CoordMode, ToolTip, Screen
SoundGet, currsnd1
SetTimer, CheckMute, 100
;Building Empty Bar
Loop, 25
EmptyBar = %EmptyBar%%Empty%
Exit
Display:
IfNotEqual, Type, W, SoundGet, currsnd
IfEqual, Type, W, SoundGet, currsnd, Wave
if currsnd1 <> %currsnd%
{
IfNotEqual, Type, W, ToolTip, Vol %currsnd%`% %curr%, %PosX%, %PosY%
IfEqual, Type, W, ToolTip, Wave %currsnd%`% %curr%, %PosX%, %PosY%
currsnd1 = %currsnd%
}
Type =
setenv, presstime, %A_MDay%%A_hour%%A_Min%%A_Sec%
envadd, presstime, 2
SetTimer, SplashOff, On
return
Splashoff:
setenv, presstime2, %A_MDay%%A_hour%%A_Min%%A_Sec%
ifgreaterorequal, presstime2, %presstime%
{
ToolTip
SetTimer, SplashOff, off
}
return
;___________________________________________
;_____Hotkey Customisation Section__________
; User defined hotkeys here
wVolUp:
Type = W
VolUp:
#MaxHotkeysPerInterval 50
IfNotEqual, Type, W
{
SoundSet, +4
SoundGet, currsnd
}
IfEqual, Type, W
{
SoundSet, +4, Wave
SoundGet, currsnd, Wave
}
mark=0
curr=%EmptyBar%
loopup:
mark += 4
iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
iflessorequal,mark, %currsnd%, goto, loopup
gosub, display
return
wVolDn:
Type = W
VolDn:
#MaxHotkeysPerInterval 50
IfNotEqual, Type, W
{
SoundSet, -4
SoundGet, currsnd
}
IfEqual, Type, W
{
SoundSet, -4, Wave
SoundGet, currsnd, Wave
}
mark=0
curr=%EmptyBar%
loopdown:
mark += 4
iflessorequal,mark, %currsnd%,StringReplace, curr, curr,%Empty%,%Full%
iflessorequal,mark, %currsnd%, goto, loopdown
gosub, display
return
;___________________________________________
;__________MUTE DETECTION BY COMPUBOY_R
CheckMute:
SoundGet,checkmute,,MUTE
if checkmute = On
{
TrayTip,Volume,MUTE,,1
mutetray = yes
}
else
{
if mutetray = yes
{
TrayTip
mutetray = no
}
}
return
Edited to wrap the script in [code] tags - lanux128