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. [help] GetWindowText

Hello could someone help me get a window text, I currentlu have this script but I cant get the window text

quote:

var sTitle;

function OnEvent_MyMediaChange (new_media) {

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


Interop.Call('User32','GetWindowTextW', playerHwnd, sTitle);


Debug.Trace('Media Info is :'+ new_media + playerHwnd + stitle);

}



It is getting playerHwnd correctly but I dont know whats wrong with sTitle.

I have a similiar function in VB6 that is currently working its:

quote:
Public Function getWinampSong() As String
    Dim lblWinamp As Object
    'This function will get the song current ' ly playing on Winamp

    If hWndWinAMP = 0 Then
        '~~/\~~ return error code...
        Exit Function
   End If

    Dim lRet As Integer
    Dim sTitle As String * 256
    If hWndWinAMP > 0 Then
        lRet = GetWindowText(hWndWinAMP, sTitle, 256)
       getWinampSong = Left(sTitle, InStr(1, sTitle, vbNullChar) - 10)
   Else
      getWinampSong = "Winamp Not Found"
    End If

End Function



Hope someone can help me.
Thanks.
06-28-2006 07:17 PM
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