ctypes to customize MSN now playing status

Discussion in 'Python' started by est, Jan 6, 2009.

  1. est

    est Guest

    Hi guys, I am trying to switch MSN/WLM now playing status using ctypes
    with python, here's my code

    import ctypes, win32con, win32api, win32gui

    FindWindow = ctypes.windll.User32.FindWindowA
    SendMessage = ctypes.windll.User32.SendMessageA

    hWnd = FindWindow('MsnMsgrUIManager', None)

    s = u"\\0Music\\01\\0{test}\\0\\0\\0\\0\\0<file://0Music//01//0%7Btest
    %7D//0//0//0//0//0>"

    class MsnData(ctypes.Structure):
    _fields_ = [("dwData", ctypes.c_int),
    ("cbData", ctypes.c_int),
    ("lpData", ctypes.c_wchar_p),
    ]

    msndata = MsnData(0x547, 256, ctypes.c_wchar_p(s))

    SendMessage(hWnd, win32con.WM_COPYDATA, 0, ctypes.byref(msndata))

    The code is not working, could anybody help?
     
    est, Jan 6, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Stephen D. Carlton
    Replies:
    0
    Views:
    684
    Stephen D. Carlton
    Dec 9, 2003
  2. =?Utf-8?B?UkdUdWNzb24=?=

    MSN Live messenger obligatory upgrade from msn messenger

    =?Utf-8?B?UkdUdWNzb24=?=, Sep 19, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    605
    =?Utf-8?B?UkdUdWNzb24=?=
    Sep 19, 2007
  3. Pager O Rama

    MSN BLOCK CHECKER-MSN STATUS CHECKER-MSN PROBLEMS

    Pager O Rama, Apr 4, 2006, in forum: ASP General
    Replies:
    0
    Views:
    296
    Pager O Rama
    Apr 4, 2006
  4. Wu Nan
    Replies:
    0
    Views:
    123
    Wu Nan
    Dec 26, 2007
  5. Pat Kiatchaipipat

    require 'msn/msn'?

    Pat Kiatchaipipat, Apr 21, 2008, in forum: Ruby
    Replies:
    4
    Views:
    126
    Pat Kiatchaipipat
    Apr 21, 2008
Loading...

Share This Page