What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [help] GetWindowText

[help] GetWindowText
Author: Message:
cirix
New Member
*


Posts: 10
Joined: Jun 2006
O.P. RE: [help] GetWindowText
Thank you its working, here is the code in case any one cares:
quote:

function OnEvent_MyMediaChange (new_media) {

playerHwnd = Interop.Call('User32','FindWindowW','Winamp v1.x',0);

var lBuffer = Interop.Call('user32', 'GetWindowTextLengthW', playerHwnd);

var sBuffer = Interop.Allocate(2*(lBuffer+2));

var Title = Interop.Call('user32', 'GetWindowTextW', playerHwnd, sBuffer, lBuffer);

Debug.Trace('sBuffer: '+sBuffer.ReadString(0));
}



Result is:

sBuffer: 3565. Jay-Z - Aint No Nigga ft. Foxy Brown : "Reasonable Doubt" - Winam


The only problem I got now is that its cutting off the last letter but its good enough.

This post was edited on 06-29-2006 at 12:12 AM by cirix.
06-29-2006 12:12 AM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[help] GetWindowText - by cirix on 06-28-2006 at 07:17 PM
RE: [help] GetWindowText - by Eljay on 06-28-2006 at 07:30 PM
RE: [help] GetWindowText - by segosa on 06-28-2006 at 07:43 PM
RE: [help] GetWindowText - by cirix on 06-28-2006 at 07:45 PM
RE: [help] GetWindowText - by matty on 06-28-2006 at 08:01 PM
RE: [help] GetWindowText - by cirix on 06-29-2006 at 12:12 AM
RE: [help] GetWindowText - by matty on 06-29-2006 at 12:17 AM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On