It is currently Mon Sep 06, 2010 9:07 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Windows Media Player
PostPosted: Fri Mar 16, 2007 12:57 pm 
Plugin Developer

Joined: Fri Mar 16, 2007 11:36 am
Posts: 2
Location: Trondheim, Norway
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 18, 2007 8:32 pm 
Site Admin
User avatar

Joined: Mon Feb 06, 2006 11:28 pm
Posts: 2236
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!


Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Wed Sep 12, 2007 8:30 pm 

Joined: Wed Jul 12, 2006 2:47 pm
Posts: 37
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.


Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Wed Sep 12, 2007 11:24 pm 
Site Admin
User avatar

Joined: Mon Feb 06, 2006 11:28 pm
Posts: 2236
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!


Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Thu Sep 13, 2007 7:56 pm 

Joined: Wed Jul 12, 2006 2:47 pm
Posts: 37
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...


Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Thu Sep 13, 2007 8:36 pm 

Joined: Wed Jul 12, 2006 2:47 pm
Posts: 37
Sorry, it's working now. I don't know what has changed.

Thanks for your help.


Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Fri Sep 14, 2007 3:37 pm 
Site Admin
User avatar

Joined: Mon Feb 06, 2006 11:28 pm
Posts: 2236
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!


Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Fri Sep 14, 2007 9:03 pm 

Joined: Wed Jul 12, 2006 2:47 pm
Posts: 37
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?


Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Fri Sep 14, 2007 9:47 pm 
Site Admin
User avatar

Joined: Mon Feb 06, 2006 11:28 pm
Posts: 2236
Grab the latest beta and look inside the __init__.py. Near the beginning you find a list like:
Code:
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:
    ("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!


Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Sat Sep 15, 2007 12:43 pm 

Joined: Wed Jul 12, 2006 2:47 pm
Posts: 37
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 85 times
__init__.py [3.83 KiB]
Downloaded 82 times
Top
 Profile  
 
 Post subject: Re: Plugin WMPlayer - Control Windows Media Player
PostPosted: Sat Sep 15, 2007 1:05 pm 
Site Admin
User avatar

Joined: Mon Feb 06, 2006 11:28 pm
Posts: 2236
Some more actions should work. For example the fast, slow and normal speed commands. You can test them out with this macro:
Code:
<?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!


Top
 Profile  
 
 Post subject: Re: Windows Media Player
PostPosted: Wed Jan 02, 2008 10:13 am 

Joined: Wed Jan 02, 2008 1:56 am
Posts: 6
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group