Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Is it possible to show Volume OSD for Media Player Classic
Is it possible to show Volume OSD for Media Player Classic
I would like it to show my current volume level either as a bar or volume percentage when I use the volume up or down for Media Player Classic. Can this be done and if so how?
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: Is it possible to show Volume OSD for Media Player Classic
Code: Select all
from eg.WinApi.Dynamic import SendMessage
TBM_GETPOS = 1024
Find_MPC_Volume_Ctrl=eg.WindowMatcher(u'mplayerc.exe', u'{*}Media Player Classic', u'MediaPlayerClassicW', u'', u'msctls_trackbar32', 1, True, 0.0, 0)
hwnd = Find_MPC_Volume_Ctrl()
if len(hwnd) > 0:
volume = SendMessage(hwnd[0], TBM_GETPOS, 0, 0)
osd = "Volume: %i%%"
eg.plugins.EventGhost.ShowOSD(osd % volume, u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Comic Sans MS', (0, 255, 255), (0, 0, 0), 4, (0, 0), 0, 3.0, False)
Re: Is it possible to show Volume OSD for Media Player Classic
Thanks Pako worked great.Pako wrote:PakoCode: Select all
from eg.WinApi.Dynamic import SendMessage TBM_GETPOS = 1024 Find_MPC_Volume_Ctrl=eg.WindowMatcher(u'mplayerc.exe', u'{*}Media Player Classic', u'MediaPlayerClassicW', u'', u'msctls_trackbar32', 1, True, 0.0, 0) hwnd = Find_MPC_Volume_Ctrl() if len(hwnd) > 0: volume = SendMessage(hwnd[0], TBM_GETPOS, 0, 0) osd = "Volume: %i%%" eg.plugins.EventGhost.ShowOSD(osd % volume, u'0;-64;0;0;0;700;0;0;0;238;3;2;1;66;Comic Sans MS', (0, 255, 255), (0, 0, 0), 4, (0, 0), 0, 3.0, False)