Sur MSN Live, dans options, première page, vous pouvez cocher 'Afficher le titre de la chanson jouée...' , ce qui affichera dans votre message perso la musique que vous écoutez sur itunes, wmp, etc.
Seulement la plupart des gens écoute leur musique sur internet et plus précisément youtube, c'est pourquoi mon soft permet d'afficher le son youtube que vous jouez dans votre message perso.
La petite box 'Afficher le titre....' doit être cochée.
Le soft ne marche que pour youtube (si autre il suffit de changer le WinGetTitle)
Le programme détectera automatiquement la page à tout moment.
Ciao
Code:
Code : Tout sélectionner
#include <File.au3>
AutoItSetOption("WinTitleMatchMode", -2)
While 1
$Showtext = WinGetTitle("youtube")
ChangeMSNMessage(2, True, $Showtext)
sleep(1000)
Wend
Func ChangeMSNMessage($iType, $bEnable, $szText)
    Local Const $szFormat = "CoePSX\\0%s\\0%d\\0{0}\\0%s\\0\\0\\0\\0\\0"
    Local Const $WM_COPYDATA = 0x4A
    Local $szType
    Local $szMessage
    Local $iSize
    Local $pMem
    Local $stCopyData
    Local $hWindow
   
    $szType = "Music"
   
    $szMessage = StringFormat($szFormat, $szType, $bEnable, $szText)
    
    $iSize = StringLen($szMessage) + 1
    $pMem = DllStructCreate("ushort[" & $iSize & "]")
    For $i = 0 To $iSize
        DllStructSetData($pMem, 1, Asc(StringMid($szMessage, $i, 1)), $i)
    Next
    DllStructSetData($pMem, 1, 0, $iSize)
    
    $stCopyData = DllStructCreate("uint;uint;ptr")
    DllStructSetData($stCopyData, 1, 0x547) 
    DllStructSetData($stCopyData, 2, ($iSize * 2))
    DllStructSetData($stCopyData, 3, DllStructGetPtr($pMem)) 
    
    $hWindow = DllCall("user32", "hwnd", "FindWindowExA", "int", 0, "int", 0, "str", "MsnMsgrUIManager", "int", 0)
    DllCall("user32", "int", "SendMessageA", "hwnd", $hWindow[0], "int", $WM_COPYDATA, "int", 0, "ptr", DllStructGetPtr($stCopyData))
    $hWindow = DllCall("user32", "hwnd", "FindWindowExA", "int", 0, "hwnd", $hWindow[0], "str", "MsnMsgrUIManager", "int", 0)
 
   
    $pMem = 0
    $stCopyData = 0
EndFunc

