home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Talk
Volume OSD for system volume
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bogser" data-source="post: 849154" data-attributes="member: 118470"><p>Have updated my previous script that displays master volume OSD in Vista/Windows 7. Previous version does not work if 'Use Microsoft MCE remote or keyboard' option is enabled in MediaPortal configuration. Bug is fixed, new script successfully changes master volume and displays volume OSD when pressing volume control keys on MCE remote or any media keyboard.</p><p> </p><p>To run the script save it to VolumeOSD.ahk file (you can use any other file name for it), install <a href="http://l.autohotkey.net/" target="_blank">AutoHotKey_L</a>, download the latest <a href="http://www.autohotkey.com/forum/topic23792.html" target="_blank">VA.ahk</a> and place it next to the VolumeOSD.ahk, double click the VolumeOSD.ahk.</p><p> </p><p><img src="http://img820.imageshack.us/img820/6517/volumeosd.png" alt="" class="fr-fic fr-dii fr-draggable " style="" /></p><p>[CODE]#Include VA.ahk</p><p> </p><p>nVolumeIndicatorDisplayTime := 1000 ; Number of ms that should elapse before hiding volume indicator</p><p>nVolumeChangeStep := 2 ; Volume change step in percentage</p><p>nVolumeIndicatorWidth := 500</p><p>nVolumeIndicatorX := Round( (A_ScreenWidth - nVolumeIndicatorWidth) / 2 )</p><p>nVolumeIndicatorY := A_ScreenHeight - 200</p><p> </p><p>Volume_Up::</p><p> VA_SetMasterVolume(Round(VA_GetMasterVolume() + nVolumeChangeStep))</p><p> Gosub, ShowVolumeIndicator</p><p> return</p><p> </p><p>Volume_Down::</p><p> VA_SetMasterVolume(Round(VA_GetMasterVolume() - nVolumeChangeStep))</p><p> Gosub, ShowVolumeIndicator</p><p> return</p><p> </p><p>Volume_Mute::</p><p> VA_SetMasterMute(NOT VA_GetMasterMute())</p><p> Gosub, ShowVolumeIndicator</p><p> return</p><p> </p><p>ShowVolumeIndicator:</p><p> nVolume := Round(VA_GetMasterVolume())</p><p> bMute := VA_GetMasterMute()</p><p> </p><p> strVolumeText := bMute ? "Mute" : nVolume</p><p> </p><p> ; To prevent the "flashing" effect, only create the progress window if it doesn't already exist</p><p> IfWinNotExist, HTPCVolumeOSDWindowTitle</p><p> {</p><p> Progress, 1:B1 W%nVolumeIndicatorWidth% X%nVolumeIndicatorX% Y%nVolumeIndicatorY% CWWhite CBGreen CTGreen, , %strVolumeText%, HTPCVolumeOSDWindowTitle</p><p> WinSet, Transparent, 225, HTPCVolumeOSDWindowTitle</p><p> }</p><p> Progress, 1:%nVolume%, , %strVolumeText%</p><p> SetTimer, HideVolumeIndicator, %nVolumeIndicatorDisplayTime%</p><p> return</p><p> </p><p>HideVolumeIndicator:</p><p> SetTimer, HideVolumeIndicator, Off</p><p> Progress, 1:Off</p><p> return</p><p>[/CODE]</p></blockquote><p></p>
[QUOTE="bogser, post: 849154, member: 118470"] Have updated my previous script that displays master volume OSD in Vista/Windows 7. Previous version does not work if 'Use Microsoft MCE remote or keyboard' option is enabled in MediaPortal configuration. Bug is fixed, new script successfully changes master volume and displays volume OSD when pressing volume control keys on MCE remote or any media keyboard. To run the script save it to VolumeOSD.ahk file (you can use any other file name for it), install [URL='http://l.autohotkey.net/']AutoHotKey_L[/URL], download the latest [URL='http://www.autohotkey.com/forum/topic23792.html']VA.ahk[/URL] and place it next to the VolumeOSD.ahk, double click the VolumeOSD.ahk. [IMG]http://img820.imageshack.us/img820/6517/volumeosd.png[/IMG] [CODE]#Include VA.ahk nVolumeIndicatorDisplayTime := 1000 ; Number of ms that should elapse before hiding volume indicator nVolumeChangeStep := 2 ; Volume change step in percentage nVolumeIndicatorWidth := 500 nVolumeIndicatorX := Round( (A_ScreenWidth - nVolumeIndicatorWidth) / 2 ) nVolumeIndicatorY := A_ScreenHeight - 200 Volume_Up:: VA_SetMasterVolume(Round(VA_GetMasterVolume() + nVolumeChangeStep)) Gosub, ShowVolumeIndicator return Volume_Down:: VA_SetMasterVolume(Round(VA_GetMasterVolume() - nVolumeChangeStep)) Gosub, ShowVolumeIndicator return Volume_Mute:: VA_SetMasterMute(NOT VA_GetMasterMute()) Gosub, ShowVolumeIndicator return ShowVolumeIndicator: nVolume := Round(VA_GetMasterVolume()) bMute := VA_GetMasterMute() strVolumeText := bMute ? "Mute" : nVolume ; To prevent the "flashing" effect, only create the progress window if it doesn't already exist IfWinNotExist, HTPCVolumeOSDWindowTitle { Progress, 1:B1 W%nVolumeIndicatorWidth% X%nVolumeIndicatorX% Y%nVolumeIndicatorY% CWWhite CBGreen CTGreen, , %strVolumeText%, HTPCVolumeOSDWindowTitle WinSet, Transparent, 225, HTPCVolumeOSDWindowTitle } Progress, 1:%nVolume%, , %strVolumeText% SetTimer, HideVolumeIndicator, %nVolumeIndicatorDisplayTime% return HideVolumeIndicator: SetTimer, HideVolumeIndicator, Off Progress, 1:Off return [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
Volume OSD for system volume
Contact us
RSS
Top
Bottom