Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > ctypes to customize MSN now playing status

Reply
Thread Tools

ctypes to customize MSN now playing status

 
 
est
Guest
Posts: n/a
 
      01-06-2009
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?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
WindowsXP/ CTypes - How to convert ctypes array to a string? dudeja.rajat@gmail.com Python 0 08-19-2008 10:20 AM
Change the MSN Now Playing Text with ruby Wu Nan Ruby 0 12-26-2007 06:17 AM
MSN BLOCK CHECKER-MSN STATUS CHECKER-MSN PROBLEMS Pager O Rama Digital Photography 0 04-04-2006 06:58 PM
MSN BLOCK CHECKER-MSN STATUS CHECKER-MSN PROBLEMS Pager O Rama ASP General 0 04-04-2006 06:41 PM
RE: [ctypes-users] [Ann] ctypes 0.9.0 released Henk Punt Python 0 07-23-2004 10:34 PM



Advertisments