Thanks Pako helped me out again.. now I setup a fullscreen check and have the OSD showing on proper display
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.
How to show OSD on secondary display?
How to show OSD on secondary display?
How can I make the OSD show on the secondary monitor? Now that I moved to Windows 7 when I maximize I can't have the video on both monitors only one. So now when it's maximized the video shows on the secondary display.
Thanks Pako helped me out again.. now I setup a fullscreen check and have the OSD showing on proper display
Thanks Pako helped me out again.. now I setup a fullscreen check and have the OSD showing on proper display
Last edited by molitar on Tue Jan 26, 2010 7:32 am, edited 2 times in total.
Re: OSD to show current time / end time
Sounds like you get some info from a media player prgoram.. which one?
Re: OSD to show current time / end time
MediaPlayer Classic Home Cinema from the CCCP pack.. mpc-hc.exe is the name of the executable.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: OSD to show current time / end time
Code: Select all
Find_MPC_Time=eg.WindowMatcher(u'mpc-hc.exe', u'{*}Media Player Classic{*}', u'MediaPlayerClassicW', None, u'Static', 2, True, 0.0, 0)
hwnd = Find_MPC_Time()
if len(hwnd) > 0:
timeE,timeR = eg.WinApi.GetWindowText(hwnd[0]).split(' / ')
osd = "Elapsed time: %s\nRemaining time:%s"
eg.plugins.EventGhost.ShowOSD(osd % (timeE,timeR), 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: OSD to show current time / end time
Awesome thanks Pako both you and Jinxdone you helped me to make a very functional mpc-hc remote commands
Now got my volume osd, playtime osd, and my window state toggle.
Re: OSD to show current time / end time
Hay Pako,
Thanks for this script, it was exactly what I was looking for...almost. I'm a Python code know nothing but I tweaked some of the settings to change the font (easy) and also the OSD's screen position (harder at first).
Now I wonder if this OSD could be made to just be a simple line/bar graph instead of text/numbers? Sort of like some PC's display a volume bar on bottom of screen...the width of the screen would equal 100% of video, 1/3 bar/line of screen about 33% etc. If not doable no biggie.
Thanks again my friend...
ALL of you code guys (& ladies) are AWESOME.
Thanks for this script, it was exactly what I was looking for...almost. I'm a Python code know nothing but I tweaked some of the settings to change the font (easy) and also the OSD's screen position (harder at first).
Now I wonder if this OSD could be made to just be a simple line/bar graph instead of text/numbers? Sort of like some PC's display a volume bar on bottom of screen...the width of the screen would equal 100% of video, 1/3 bar/line of screen about 33% etc. If not doable no biggie.
Thanks again my friend...
ALL of you code guys (& ladies) are AWESOME.
eventghost.net
Be there or be square.
Be there or be square.
Re: OSD to show current time / end time
That would be cool. Question which part of the line is the seconds? What I would like to do is make it only show for about .60 seconds and loop/repeat about 5 times.. that would make a realtime update count for about a 3 second view. Got a good script to do this I was thinking one method is to increment a value and use a loop and if the value is not equal or greater than loop again as one method.zian wrote:Hay Pako,
Thanks for this script, it was exactly what I was looking for...almost. I'm a Python code know nothing but I tweaked some of the settings to change the font (easy) and also the OSD's screen position (harder at first).
Now I wonder if this OSD could be made to just be a simple line/bar graph instead of text/numbers? Sort of like some PC's display a volume bar on bottom of screen...the width of the screen would equal 100% of video, 1/3 bar/line of screen about 33% etc. If not doable no biggie.
Thanks again my friend...
ALL of you code guys (& ladies) are AWESOME.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: OSD to show current time / end time
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
<Macro Name="Show Volume Bar Graph" Expanded="True">
<Action>
EventGhost.PythonScript(u"from eg.WinApi.Dynamic import SendMessage\nTBM_GETPOS = 1024\nFind_MPC_Volume_Ctrl=eg.WindowMatcher(u'mplayerc.exe', u'{*}Media Player Classic', u'MediaPlayerClassicW', u'', u'msctls_trackbar32', 1, True, 0.0, 0)\nhwnd = Find_MPC_Volume_Ctrl()\n\nM = 5\n\nif len(hwnd) > 0:\n#if 1:\n volume = int(SendMessage(hwnd[0], TBM_GETPOS, 0, 0)/10)\n #volume = int(eg.WinApi.SoundMixer.GetMasterVolume())/10\n eg.result = volume*M*u'\\u2588'\nelse:\n eg.result = ''")
</Action>
<Action>
EventGhost.ShowOSD(u'{eg.result}', u'0;-48;0;0;0;400;0;0;0;238;3;2;1;49;Lucida Console', (255, 0, 0), (0, 0, 0), 2, (0, 0), 0, 3.0, False)
</Action>
</Macro>
</EventGhost>You can change the constant M in the script and font size, so you at 100% volume got a bar over the whole width of the screen.
Pako
Re: OSD to show current time / end time
Pako, thanks but your missing a set of brackets in the Find where it is u'{*}Media Player Classic', it should be u'{*}Media Player Classic{*}',. Took me a little bit of studying of the prior OSD to figure out what was different.
I modified the script to further show the percentage at the end of the volume bar. Note I also had to change the /10 to /5 in volume = int(SendMessage(hwnd[0], TBM_GETPOS, 0, 0)/5 to get proper display for each press for MPC seems it uses a divisible of 5 not by 10.
I modified the script to further show the percentage at the end of the volume bar. Note I also had to change the /10 to /5 in volume = int(SendMessage(hwnd[0], TBM_GETPOS, 0, 0)/5 to get proper display for each press for MPC seems it uses a divisible of 5 not by 10.
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
<Macro Name="Volume Up">
<Action>
MediaPlayerClassic.VolumeUp()
</Action>
<Action>
EventGhost.PythonScript(u'from eg.WinApi.Dynamic import SendMessage\nTBM_GETPOS = 1024\nFind_MPC_Volume_Ctrl=eg.WindowMatcher(u\'mpc-hc.exe\', u\'{*}Media Player Classic{*}\', u\'MediaPlayerClassicW\', u\'\', u\'msctls_trackbar32\', 1, True, 0.0, 0)\nhwnd = Find_MPC_Volume_Ctrl()\n\nM = 2\n\nif len(hwnd) > 0:\n volume = int(SendMessage(hwnd[0], TBM_GETPOS, 0, 0)/5)\n eg.result = volume*M*u\'\\u2588\'\n volume2 = SendMessage(hwnd[0], TBM_GETPOS, 0, 0)\n eg.result2 = volume2\nelse:\n print "Window not found"\n eg.result = \'\'')
</Action>
<Action>
EventGhost.ShowOSD(u'Volume: {eg.result} {eg.result2}%', u'0;-48;0;0;0;400;0;0;0;238;3;2;1;49;Lucida Console', (255, 0, 0), (0, 0, 0), 0, (60, 150), 0, 2.0, False)
</Action>
<Action>
EventGhost.AutoRepeat(0.59999999999999998, 0.59999999999999998, 0.01, 2.0)
</Action>
</Macro>
</EventGhost>Re: OSD to show current time / end time
Okie dokie,
Cool, I have been looking for that volume bar graph type OSD a while back. Gonna try to see if I can get it to work with my general volume and not only MPC.
But...
We have two macros/scripts on this topic now. One for MPC play times and one for MPC volumes. I tried combining them...sort of and failed. I'm looking to make the MPC time OSD bar/graph style.
Any help would be great.
Thanks again.
Cool, I have been looking for that volume bar graph type OSD a while back. Gonna try to see if I can get it to work with my general volume and not only MPC.
But...
We have two macros/scripts on this topic now. One for MPC play times and one for MPC volumes. I tried combining them...sort of and failed. I'm looking to make the MPC time OSD bar/graph style.
Any help would be great.
Thanks again.
eventghost.net
Be there or be square.
Be there or be square.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: OSD to show current time / end time
I'm sorry.
I am in error into the Volume macro put the MPC time script.
I tried it only with master volume (commented lines).
When I made the first script (MPC volume), it was normal MPC. Therefore there is only u'{*}Media Player Classic'.
The second script (MPC time) was made for the mpc-hc.exe. Therefore, there was u'{*}Media Player Classic{*}'.
Pako
I am in error into the Volume macro put the MPC time script.
I tried it only with master volume (commented lines).
When I made the first script (MPC volume), it was normal MPC. Therefore there is only u'{*}Media Player Classic'.
The second script (MPC time) was made for the mpc-hc.exe. Therefore, there was u'{*}Media Player Classic{*}'.
Pako
Re: OSD to show current time / end time
For Main volume control I use a freeware software called 3RVX it has all sorts of skins for volume control. So when you change primary volume you have an OSD bar. So I don't bother with a main volume OSD in Ghost for their is no need nothing beats 3RVX for that purpose.
On side note I have really learned how to use global variables to check window state for Fullscreen. When I toggle fullscreen I toggle a value.. than when I hit fullscreen button it checks to see if windows is maximized or minimized first and will restore the window before fullscreen takes affect. It was your script that eg.result that showed me how to use variables so thanks with that bit of knowledge I created a variable called eg.fullscreen and set it to True or False.
On side note I have really learned how to use global variables to check window state for Fullscreen. When I toggle fullscreen I toggle a value.. than when I hit fullscreen button it checks to see if windows is maximized or minimized first and will restore the window before fullscreen takes affect. It was your script that eg.result that showed me how to use variables so thanks with that bit of knowledge I created a variable called eg.fullscreen and set it to True or False.
Re: OSD to show current time / end time
Hello Peeps,
Sorry if this is wrong topic or if this info is posted here already (I did look).
Another MPC OSD function I'm looking for...
On screen display for the title of a file that is playing.
Thanks much if you can point me in the right direction and I'll keep looking.
Sorry if this is wrong topic or if this info is posted here already (I did look).
Another MPC OSD function I'm looking for...
On screen display for the title of a file that is playing.
Thanks much if you can point me in the right direction and I'll keep looking.
eventghost.net
Be there or be square.
Be there or be square.
Re: OSD to show current time / end time
If your using mpc than usually you have ffdshow running also.. I have set my ffdshow to always run for all file types.. setup OSD that shows just what your looking for.. the ffdshow OSD can show alot of information.zian wrote:Hello Peeps,
Sorry if this is wrong topic or if this info is posted here already (I did look).
Another MPC OSD function I'm looking for...
On screen display for the title of a file that is playing.
Thanks much if you can point me in the right direction and I'll keep looking.
Re: OSD to show current time / end time
Thanks molitar...I'll check that out.
I also somewhat took care of the issue with the information in this link...
TextGrab Plug-in
http://www.eventghost.org/forum/viewtop ... f=2&t=1962
It was very handy.
I also somewhat took care of the issue with the information in this link...
TextGrab Plug-in
http://www.eventghost.org/forum/viewtop ... f=2&t=1962
It was very handy.
eventghost.net
Be there or be square.
Be there or be square.