AutoHotkey Community

It is currently May 27th, 2012, 11:16 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: March 10th, 2006, 12:22 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
I went through the ordinary methods of finding documented or undocumented messages (SendMessage/PostMessage) supported by Windows Media Player 10:
  • AHK forum. I found a few posts (references in my notes below) with hints that there is a lot more out there.
  • Windows Media Player SDK. I didn't find anything of value. I may have not looked in the right places?
  • Web search. I did a medium-level web search. I was surprised to find more information on this forum than out in the wild.
  • WinSpector Spy. I couldn't get WMP to give up a single usable message. I think a few others have noted this.
Finally, out of desperation, I did a brute force attack and discovered some of the basic WM_COMMAND parameters and their associated responses. The results are included in my notes below.

:?: Does anyone have a list of messages that can supplement or replace what I've found already? :?:
Thanks in advance for your assistance.

The following are my (unformatted and incomplete) notes:
I put it in a "Code" block for the fixed font.

Code:
WMP SendMessage/PostMessage

AHK forum references
--------------------
http://www.autohotkey.com/docs/misc/SendMessage.htm (Tutorial)
http://autohotkey.com/forum/viewtopic.php?t=2964
http://autohotkey.com/forum/viewtopic.php?t=5493
http://autohotkey.com/forum/viewtopic.php?t=7728


Class
-----
ahk_class WMPlayerApp         ;-- Regular
ahk_class WMP Skin Host       ;-- Skin mode



Window Title
------------
Windows Media Player



SendMessage Example
-------------------
SendMessage 0x111,18808,0,,ahk_class WMPlayerApp  ;-- Play/Pause


Message
-------
WM_COMMAND - 0x111



Message Parameter (wParam)                                  Notes
-----------------                                           -----
16000 - Go to "Now Playing"
16001 - Go to "Guide"
16002 - Go to "Service Task 1"                              This is the "Music" tab on my player
16003 - Go to "Rip"
16004 - Go to "Library"
16005 - Go to "Service Task 3"                              This is the "Video" tab on my player
16006 - Go to "Burn"
16007 - Go to "Sync"
16008 - Go to "Service Task 2"                              This is the "Radio" tab on my player

16009 - Skin Chooser

18724 - Rip Audio CD                                        Doesn't do anything if media is playing

18777 - "Rip" tab

18779 - Open "Properties" dialog                            RC=FAIL. Use 32779 or PostMessage
18780 - View Full Mode
18781 - View Compact Mode
18782 - Full screen (toggle)
18783 - Show/Hide Playlist (toggle)

18787 - Show/Hide Media Information (toggle)

18789 - Show/Hide Enhancements (toggle)

18791 - Show/Hide Title (toggle)

18799 - Video Size: 50%
18800 - Video Size: 100%
18801 - Video Size: 200%
18802 - Video Size: Fit Video to Player on Resize (toggle)

18805 - Video Size: Fit Player to Video on Start (toggle)

18808 - Play/Pause Track (toggle)
18809 - Stop
18810 - Previous Track
18811 - Next track
18812 - Rewind                                              Only works on video?
18813 - Fast Forward (toggle)

18815 - Volume: Up
18816 - Volume: Down
18817 - Volume: Mute (toggle)

18824 - View Privacy Statement                              Link to external web page
18825 - Open "Options" dialog                               RC=FAIL. Use 32825 or PostMessage
18826 - Open "Windows Media Player Help"

18834 - Play Speed: Fast
18835 - Play Speed: Normal
18836 - Play Speed: Slow

18842 - Shuffle (toggle)
18843 - Repeat (toggle)

18846 - Download: Visualizations                            Link to external web page

18849 - Open "Add to Library by Searching Computer" dialog  RC=FAIL. Use 32849 or PostMessage
18850 - Open "Monitory Folders" dialog                      RC=FAIL. Use 32850 or PostMessage

18861 - Open "File Open" dialog                             RC=FAIL. Use 32861 or PostMessage
18862 - Open "Open URL" dialog                              RC=FAIL. Use 32862 or PostMessage

18871 - Open "Manage Licenses" dialog                       RC=FAIL. Use 32871 or PostMessage
18872 - Open "Open URL" dialog   (Same as 18862?)           RC=FAIL. Use 32862 or PostMessage

Codes 18880 to ????? causes WMP to crash. RC=FAIL or
  RC=0.  Haven't tried PostMessage


18889 - Save "Now Playing List" As                          RC=FAIL. Use ????? or PostMessage

18904 - Work Offline (toggle)

18907 - Burn Audio CD

18909 - Synchronize

18794 - Open "Statistics" dialog

19102 - Print Label                                         Not sure when this is available

19011 - Open "Save As" dialog                               RC=FAIL. Use ????? or PostMessage

19013 - Save "Now Playling List"
19014 - New "Now Playing List"

19141 - Windows Media Player Online                         Link to external web page
19142 - Download: Supported Devices and Drivers             Link to external web page
19143 - Download: Skins                                     Link to external web page

19160 - Troubleshooting                                     Link to external web page

19200 - Info Center View (Under "Now Playing" tab)

19230 - Display "Quiet Mode"                                Shows "Enhancements" window
19231 - Display "Color Chooser"                             Shows "Enhancements" window
19232 - Display "Crossfading and Auto Volume Leveling"      Shows "Enhancements" window
19233 - Display "Graphic Equalizer"                         Shows "Enhancements" window
19234 - Display "Media Link for E-Mail"                     Shows "Enhancements" window
19235 - Display "Play Speed Settings"                       Shows "Enhancements" window
19236 - Display "SRS WOW Effects"                           Shows "Enhancements" window
19237 - Display "Video Settings"                            Shows "Enhancements" window

19497 - Download Plug-ins                                   Link to external web page
19498 - Open Plug-ins Options dialog

19500 - DVD: Root Menu
19501 - DVD: Title Menu                                     Returns 1 if menu is not available (?)
19502 - DVD: Close Menu (Resume)
19503 - DVD: Back

19572 - Update DVD Information                              RC=FAIL. Use ????? or PostMessage

19681 - DVD, VCD or CD Audio

19721 - Show Menu Bar
19722 - Hide Menu Bar
19723 - Autohide Menu Bar
19724 - Hide Taskbar (toggle)

19998 - Download: Plug-ins                                  Link to external web page
19999 - Open Plug-ins Options dialog                        RC=FAIL. Use 19498 or PostMessage

26000 - Services List



32777 - Info Center View (Under "Now Playing" tab)

32779 - Open "Properties" dialog
32780 - View Full Mode
32781 - View Compact Mode
32782 - Full screen (toggle)
32783 - Show/Hide Playlist (toggle)

32787 - Show/Hide Media Information (toggle)

32789 - Show/Hide Equilizer (toggle)

32791 - Show/Hide Title (toggle)

32794 - Open "Statistics" dialog

32797 - *** Locks up WMP & eats up CPU. Don't know why ***
32798 - *** Locks up WMP & eats up CPU. Don't know why ***

32805 - "Music" tab
32806 - "Library" tab

32808 - Play/Pause Track (toggle)
32809 - Stop
32810 - Previous Track
32811 - Next Track

32813 - Fast Forward (toggle)

32815 - Volume Up
32816 - Volume Down
32817 - Volume Mute (toggle)

32824 - Link to Privacy Statement (web)
32825 - Open "Options" dialog
32826 - Open "Windows Media Player Help"

32834 - Play Speed: Fast
32835 - Play Speed: Normal
32836 - Play Speed: Slow

32842 - Shuffle (toggle)
32843 - Repeat (toggle)

32846 - Download: Visualizations                            Link to external web page

32849 - Open "Add to Library by Searching Computer" dialog
32850 - Open "Monitory Folders" dialog

32861 - Open "File Open" dialog
32862 - Open "Open URL" dialog

32871 - Open "Manage Licenses" dialog
32872 - Open "Open URL" dialog   (Same as 32862?)

Codes 32880 to ????? causes WMP to crash. RC=FAIL or
  RC=0. Haven't tried PostMessage.


57601 - Open "File Open" dialog                             RC=FAIL. Use 32861 or PostMessage
57602 - File Close

57665 - Exit
--------------------------------------------------------------------------------


Send Commands - Media Player
-------------
Media_Next - Next Track
Media_Prev - Previous Track
Media_Stop - Stop
Media_Play_Pause - Play/Pause (toggle))

   Example
   -------
   send {Media_Play_Pause}



Send Commands - Windows
-------------
Volume_Mute
Volume_Down
Volume_Up

   Example
   -------
   send {Volume_Down}


------
20060309: Add new messages per info provided by JSLover
20060310: Minor edit to make the notes a bit easier to read


Last edited by jballi on March 10th, 2006, 10:12 pm, edited 2 times in total.

Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 10th, 2006, 1:19 am 
Offline
User avatar

Joined: December 20th, 2004, 12:19 pm
Posts: 798
Location: LooseChange911.com Ask Questions, Demand Answers █ The WTC bldgs █ shouldn't have fallen █ that fast
jballi wrote:
Finally, out of desperation, I did a brute force attack...

...EEK!!!...bad idea...

jballi wrote:
Does anyone have a list of messages...

...hehe, yup...just went looking & found...C:\Windows\System32\wmploc.dll...1 word (or 2?)...ResHacker...read the menu resource (& maybe others)...whatever you do...don't save!...example...

wmploc.dll (10.0.0.3646) - MENU - 102 - 1033 wrote:
Code:
102 MENU LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
{
POPUP "&File"
{
   MENUITEM "&Open...\tCtrl+O",  57601
   MENUITEM "Open &URL...\tCtrl+U",  18872
   MENUITEM "Sa&ve As...",  19011
   MENUITEM "C&lose\tCtrl+W",  57602
   MENUITEM SEPARATOR

...the numbers are the WM_COMMAND numbers...what do all your "RC=FAIL" comments mean?...what failed...how?

_________________
AutoHotkey-Hotstring.ahk - Helping the world spell "AutoHotkey" correctly! (btw, it's a lowercase k!)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 10th, 2006, 6:24 am 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Dear jballi, :)

Thats a long & extensive listing ! :) . Great work.

Brute Force?

You have referred to my post on WMP Postmessage commands. I used Spy++ that came bundled with Visual Studio 6 through which it was very easy to capture the WM_COMMAND parameters.

I think Spy++ should also work as a standalone. Maybe you can try Spy++ it from someone who uses VC++. Its an excellent tool.

Regards, :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
PostPosted: March 10th, 2006, 7:11 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 775
Location: Texas, USA
JSLover wrote:
yup...just went looking & found...C:\Windows\System32\wmploc.dll...ResHacker...

Great find and neat little program. This little program definitely goes into my toolbox. The wmploc.dll file was loaded with information. It was a pain in the butt but I updated my notes in the 1st post to reflect a bunch of new message parameters that I found. Thanks for the info!

JSLover wrote:
what do all your "RC=FAIL" comments mean?...what failed...how?

"RC" is my abbreviation for return code (ErrorLevel). "FAIL" is the standard AHK ErrorLevel returned when using SendMessage and there was a problem. WMP received and responded correctly to the message so I'm not sure why there was a problem. PostMessage works in these instances (Errorlevel is always(?) 0) so use it for these messages.

I try to use SendMessage whenever possible because 1) you can check the return code and 2) the script never gets ahead of itself (usually) because it always waits for a response before continuing.

Goyyah wrote:
Brute Force?

I just wrote a script that sent a sequence of messages to WMP, one at a time, and I just observed what happened. Some of the stuff was obvious. The other stuff was a little tricky.

Goyyah wrote:
I think Spy++ should also work...

As I noted in the original post I used WinSpector Spy but couldn't get WMP to give up a single usable message. I don't have Spy++ but I may have to track it down so that I can use it in the future. I've gotten mixed reviews on the program but I just may have to bite the bullet.

Just out of curiosity, did you try Spy++ on Windows Media Player 10?


Thanks to everyone for your feedback. I appreciate it!

I'm still looking for more formal/complete documentation. If anyone has it, please pass it along.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 10th, 2006, 7:20 am 
Online
User avatar

Joined: December 26th, 2005, 4:40 pm
Posts: 8776
Dear jballi, :)
you wrote:
Just out of curiosity, did you try Spy++ on Windows Media Player 10?


No! I tried it with WMP7 in WIN98SE and noted down the Parameters. I was NOT surprised when same parameters worked with WMP9 in WINXP, because the buttons were generic and I guessed it right that it should be the same for the advanced versions. Maybe I should install WMP10 & give Spy++ a try!

Regards, :)

_________________
URLGet - Internet Explorer based Downloader
StartEx - Portable Shortcut Link


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 10th, 2006, 12:09 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
@jbally: As JSLover wrote, using brute force may not be such a good idea, because some programs don't like receiving an unexpected WM_COMMAND and can crash...
Spy++ is bundled with Visual Studio. I don't know if it is available with the free version. Perhaps it is even available on MSDN, I don't know.
Note that Winspector Spy was made out of frustation with Spy++, so it is supposed to be better...

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject: enhancements
PostPosted: May 10th, 2006, 12:31 am 
Concerning messages 19230-19237, is it possible to interact with the enhancements themselves once they've been shown?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 25th, 2008, 4:02 am 
Offline

Joined: January 13th, 2008, 6:00 pm
Posts: 115
Is there a way to increase/decrease the playback speed by a set amount rather than the stock "slow", "normal", or "fast"?

Unfortunately, I don't know how to take advantage of this information with AHK: http://msdn2.microsoft.com/en-us/library/bb262909(VS.85).aspx

[ Moderator!: MSDN link fixed ]


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: enhancements
PostPosted: April 26th, 2008, 8:31 pm 
Offline

Joined: January 13th, 2008, 6:00 pm
Posts: 115
jaco0646 wrote:
Concerning messages 19230-19237, is it possible to interact with the enhancements themselves once they've been shown?


I gave up on WMP and am using Gom Player, which I just found after a ton of searching, instead.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 5th, 2008, 5:35 am 
'open url' is not 32862. should be 32872


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 11th, 2009, 9:46 am 
Hi Everyone,

I need to know what the equivalent of the enter key is. or in other words, how to play the current selected song (not toggle play/pause)

Thanks for your help,

Ricky


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey and 11 guests


You can post new topics in this forum
You can 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:
Powered by phpBB® Forum Software © phpBB Group