What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Plug-Ins » other users last message

other users last message
Author: Message:
thomasa88
New Member
*


Posts: 6
– / Other / –
Joined: Dec 2005
O.P. Huh?  other users last message
Im trying to get the other users last message, Ive tried with the history but then I get all text and there is no separators :(

Is there any event or someway to get a text with separators?


(this is what I got so far:
code:
            IMessengerConversationWnd *convWnd;
            pParam->iConversationWnd->QueryInterface(IID_IMessengerConversationWnd,(void**)&convWnd);
            if(convWnd != NULL)
            {
                BSTR historyB = NULL;
                convWnd->get_History(&historyB);

                string history;
                if(historyB)
                {
                    //Convert the string from BSTR to char*
                    history = string((char*)_bstr_t(historyB));
                    SysFreeString(historyB);
                }
                //msgplus will do this when plugin ends but..
                convWnd->Release();

                char *len;
                _ui64toa(history.length(), len, 10);
                MessageBox(GetActiveWindow(), len, "hist length", MB_OK);
                size_t latestMsg = history.find_last_of("T");
                _ui64toa(latestMsg, len, 10);
                MessageBox(NULL, len, "latest", MB_OK);
                MessageBox(NULL, history.substr(history.length() - 500).c_str(), "substr", MB_OK);

                if(latestMsg != string::npos)
                    result += history.substr(latestMsg);
            }

)
12-26-2005 09:01 AM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »


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