News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Interacting with Media Player

Started by sinsi, November 06, 2006, 11:26:33 AM

Previous topic - Next topic

sinsi

What I would like to do is:
  Start playing a playlist in Media Player
  Minimise it
  Have a way (from any prog of mine) of previous/next song

I am thinking FindWindow to get Media Player's hwnd and using SendMessage to send
a keystroke. The trouble is how do I send ctrl-b or ctrl-f? For that matter, how can I send
a window a key?

I don't want to have to go into the Media Player SDK for such a simple(?) thing... ::)
Light travels faster than sound, that's why some people seem bright until you hear them.

ragdog

hi

What are you after? the send apis to play,stop,back...???

sinsi

G'day ragdog, all I want is back/forward...that's it, since it's on repeat. Is there an API for it?
Light travels faster than sound, that's why some people seem bright until you hear them.


ragdog

18808 play
18809 stop
18810 back
18811 forward

sinsi

ragdog, that link seems perfect, bewdy mate!  :U

[a bit later]Just saw your latest post, adds to my understanding (and the value of the link). Champion!  :clap:
Light travels faster than sound, that's why some people seem bright until you hear them.

ragdog

:bg
if your project finsish post the program? :bg

sinsi

heh heh if it ever gets beyond the "it works on my machine" stage  :bg
Light travels faster than sound, that's why some people seem bright until you hear them.

ragdog


ragdog


sinsi

Here is some quick, dirty and drunk code...but it works on my machine  :bg which is xp home sp2 and mp11 beta.
This is just to see if it works, obviously a slicker gui would help  :bdg

Edit: added the exe to the zip

[attachment deleted by admin]
Light travels faster than sound, that's why some people seem bright until you hear them.

ragdog

 :bg thsi work on my maschine :bdg

here is my source

[attachment deleted by admin]

sinsi

This is the most brilliant thing, sending a menu-click to a window...
You, ragdog, are a BLOODY LEGEND.

Now, I'll put an app on a timer and use GetAsyncKeyState to control it (just like a game trainer (oops! shh)).
Light travels faster than sound, that's why some people seem bright until you hear them.

ragdog

hi sinsi :toothy

this work´s too with GetAsyncKeyState! :8)

have you powerdvd commands?

best regards
ragdog

sinsi

Old topic, but new info: the same code works in win7beta/mp12 (although fast-forward has changed) but if I run a game as admin (old games, fair enough but new *vista* compatible games? cmon) the keys don't work...unless I run my program as admin too. I've seen stuff about raising privileges via the good old manifest, anyone got one that actually works?

ETA: lay off the beer, sinsi. Topic: Run Elevated
The sad thing is that I posted in that thread...
Light travels faster than sound, that's why some people seem bright until you hear them.