Computing Staff
  • 0

Python Pause/Resume Media Center?

  • 0

Hey,
I was just wondering if it would be possible to pause or resume a video that is being played in windows media center (im assuming the command would be the same for media player). I’m not sure if this is possible. I have a keyboard with a pause button on it, so perhaps it is just a matter of telling python to press a key? .. i have no idea 😛 – thanks ahead.

ArukkNet Homepage — My.. Under Construction Current Project.

Feel like helping? PM me

Share

1 Answer

  1. *sigh* I have to wake up in 4 hours, and I can’t fall asleep. Well, it’s good news for you, ’cause my sleep addled brain is your gain!

    I wrote the following program in C, and it seems to work:

    #include <windows.h>
    int main() {
      ::SendMessage(0xffff, 0x319, 0, 0xE0000);
      return 0;
    }

    And apparently you can use Python’s win32api.SendMessage to send the same message. I’d assume it would look something like this, but I don’t know because I don’t have Python installed:

    import win32api
    win32api.SendMessage(0xffff, 0x319, 0, 0xE0000)

    How To Ask Questions The Smart Way

    • 0