| onhiatus Senior Member
 
  
  
 Joined: May 12 2004
 Location: United States
 Online Status: Offline
 Posts: 279
 | 
          I started to play around with sending the WM_APPCOMMAND to control Windows Media Player (see Thoughts on WMP control) and had very good results. The following PH formulas seem to work very reliably and much quicker than the sendkeys I was previously using (tested on XPHome w/ WMP 10 - ymmv, but should work on any XP or later os).
           | Posted: June 18 2006 at 21:28 | IP Logged |   |  
           | 
 |  
 The following formulas assume that windows media player is already running. In my "play" macro, I check to see that WMP is running, and if not launch it, wait 1 second, then send the message.
 
 Play: ph_sendmsg(ph_findwindow("WMPlayerApp",0),793,0,3014656)
 Pause: ph_sendmsg(ph_findwindow("WMPlayerApp",0),793,0,3080192)
 Stop: ph_sendmsg(ph_findwindow("WMPlayerApp",0),793,0,851968)
 Back: ph_sendmsg(ph_findwindow("WMPlayerApp",0),793,0,786432)
 Next: ph_sendmsg(ph_findwindow("WMPlayerApp",0),793,0,720896)
 
 Note that Play and Pause are discrete - not toggled. There's a toggle value to, but I was excited to find discrete keys.
 
 Have fun!
 
 |