Windows Media Player

Questions and comments specific to a particular plugin should go here.

Windows Media Player

Postby oystein » Fri Mar 16, 2007 11:57 am

I have created a plugin which implements some control of Windows Media Player.

Get it from here: http://minefiler.org/pub/EventGhostPlugins/WMPlayer.zip
Get demo script here: http://minefiler.org/pub/EventGhostPlugins/WMPlayer.xml (Remember to save your current xml file before opening this.)

Install:
  • Unzip the WMPlayer.zip in the 'pluggins' directory.
  • Restart EventGhost.
  • Add the pluggin to Autostart.
  • Make a script for implementing the functions. Or cut and paste form the demo xml file. ( The demo scripts 'WMPlayer' folder should be added to the 'Context Folder' folder to comply with the Examlpe.xml system)
Functions implemented:
  • TogglePlay
  • Stop
  • Next Track
  • Previous Track
  • Fast Forward
  • Fast Rewind
  • Volume Up
  • Volume Down
  • Exit
Notes:
I have only implemented the functions I need, so does someone need some other functions, add them yourself or make a post. I have used http://www.autohotkey.net/~JSLover/download/wmploc.dll-10.0.0.3646-menu-accelerators.rc as refference when building this plugin.
oystein
Plugin Developer
 
Posts: 2
Joined: Fri Mar 16, 2007 10:36 am
Location: Trondheim, Norway

Postby Bitmonster » Sun Mar 18, 2007 7:32 pm

Very nice!

If you don't mind, I will include the plugin in the normal installer.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
 
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby drummer83 » Wed Sep 12, 2007 7:30 pm

Hi,

sorry, this doesn't work on my PC. I am using Media Player 11. Nothing happens at all when executing "Windows Media Player: Next Track" for example. Is there something else to configure? I changed the Path to wmplayer.exe of course.

Thanks for your help.
drummer83
 
Posts: 37
Joined: Wed Jul 12, 2006 1:47 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby Bitmonster » Wed Sep 12, 2007 10:24 pm

Works fine here with WMP11. Where did you change the path? The plugin has no path option.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
 
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby drummer83 » Thu Sep 13, 2007 6:56 pm

Hmm, strange. I changed the path in the "Start-Macro" at "Starte Anwendung" (I don't know what it is called in the english version). But this should of course have no effect on the "Windows Media Player: Next Track" command...
drummer83
 
Posts: 37
Joined: Wed Jul 12, 2006 1:47 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby drummer83 » Thu Sep 13, 2007 7:36 pm

Sorry, it's working now. I don't know what has changed.

Thanks for your help.
drummer83
 
Posts: 37
Joined: Wed Jul 12, 2006 1:47 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby Bitmonster » Fri Sep 14, 2007 2:37 pm

Actually it would be possible to include much more actions in the plugin. But I'm to lazy to build the message list from the .rc file oystein has linked. If someone is willing to take the job, let me know.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
 
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby drummer83 » Fri Sep 14, 2007 8:03 pm

Ok, perhaps I will find the time to include some more options. But definitely not all!!! :wink:
I just tried it and got it working. So is there something else to do, or do I only have to edit the __init__.py by copy, paste and changing the name, description and number?

BTW: The Fast-Rewind is still not working on my machine. The number to submit is 39 (36?) in the .py-file, which is strange in comparison to the other numbers. I changed it to the one in the .rc-file, but both versions wont work. Any ideas about that?
drummer83
 
Posts: 37
Joined: Wed Jul 12, 2006 1:47 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby Bitmonster » Fri Sep 14, 2007 8:47 pm

Grab the latest beta and look inside the __init__.py. Near the beginning you find a list like:
Code: Select all
ACTIONS = (
    ("TogglePlay", "Toggle Play", "Simulate a press on the play / pause button.", 18808),
    ("Stop", "Stop", "Simulate a press on the stop button.", 18809),
    ("PreviousTrack", "Previous Track", "Simulate a press on the previous track button.", 18810),
...

Every line consists of four items:
1. The Python identifier to use. This should be a short descriptive camel-cased word without spaces.
2. The name of the action, as it is shown to the user. Here you can use spaces and punctuation marks.
3. The description of the action as a full sentence. If you don't want to supply a description, use "None" (without quotes) instead of a quoted string. Example:
Code: Select all
    ("ToggleRepeat", "Toggle Repeat", None, 18843),

4. The parameter as an integer number, as you find it in the .rc-file.

Just add more lines and the plugin will turn them into actions. Be careful to stay with the right indentation.

Seems like there is no fast rewind function in WMP. Only a "rewind" function. I have fixed the source to use 18812 now, but haven't tested it.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
 
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby drummer83 » Sat Sep 15, 2007 11:43 am

Ok, I tried several commands, but most of them didn't work. So in the attached file there are only added fullscreen, library, now playing and mute. This are the ones that work. The "rate title" for example doesn't work. But this even doesn't work, if I try the keyboard shortcuts given in the help (Ctrl + Windows + 1,2,3,4,5).
Attachments
WMPlayer.xml
(2.52 KiB) Downloaded 444 times
__init__.py
(3.83 KiB) Downloaded 456 times
drummer83
 
Posts: 37
Joined: Wed Jul 12, 2006 1:47 pm

Re: Plugin WMPlayer - Control Windows Media Player

Postby Bitmonster » Sat Sep 15, 2007 12:05 pm

Some more actions should work. For example the fast, slow and normal speed commands. You can test them out with this macro:
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1112">
    <Macro Name="Finde Fenster: wmplayer.exe" Expanded="True">
        <Action>
            Window.FindWindow(u'wmplayer.exe', None, u'WMPlayerApp', None, None, 1, False, 0.0, 0)
        </Action>
        <Action>
            Window.SendMessage(273, 57601, 0, 0)
        </Action>
    </Macro>
</EventGhost>


Just edit the wParam value in SendMessage.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
Bitmonster
Site Admin
 
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Windows Media Player

Postby Loli » Wed Jan 02, 2008 9:13 am

Another "problem" that i have it is that play/pause does actulaly play only - can you please add pause only too? It is realy good and usefull plugin withouth it anyway. :)

Thank you.
Loli
 
Posts: 6
Joined: Wed Jan 02, 2008 12:56 am


Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 2 guests