What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » chat window's history control interaction-advance scripting

Pages: (2): « First [ 1 ] 2 » Last »
chat window's history control interaction-advance scripting
Author: Message:
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. chat window's history control interaction-advance scripting
How can i interact with the chat window's history control doing things like clear it or clear just the last message or write message without name of his sender or just display message without the name of the sender when a ChatWndReceiveMessage events have been fired.thx for your help and have a nice day(Y)
08-08-2007 02:13 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: chat window's history control interaction-advance scripting
It isn't possible with scripting alone. While Plus! provides Win32 API functionality I am pretty sure such a feat is impossible via the standalone scripting engine.

You are going to have to do some low level programing within Windows Live Messenger's process pages to get the real handle of the chat history control since each control is wrapped in a DirectUI wrapper. Plus! doesn't even have a /clear command so goodluck with that :P
08-08-2007 03:15 PM
Profile E-Mail PM Find Quote Report
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. RE: chat window's history control interaction-advance scripting
that's exactly what i search for how to get the idcontrol using a dll and how use this id to interact with the control.i dont know why it's isnt included like thus interesting fct in plus! knowing we can make a lot of interessting  thing with it.
08-08-2007 03:33 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: chat window's history control interaction-advance scripting
A handful of people here have the knowledge of hooking the process pages of the application. The publically known way is using ActiveAccessibility but this will only give you the handle to read the contents of the chat history box but it is readonly.

matty's reply to Active Accessibility for incoming messages

This post was edited on 08-08-2007 at 03:45 PM by matty.
08-08-2007 03:41 PM
Profile E-Mail PM Find Quote Report
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. RE: chat window's history control interaction-advance scripting
there  function included in plus! return a portion of history HistoryText_GetTextRange readonly
i dont see any useful thing using active Active Accessibility
08-08-2007 03:56 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: chat window's history control interaction-advance scripting
There are only 3 readonly functions in Plus! to deal with the chat history.

HistoryText_GetTextRange
HistoryText_GetCurSelEnd
HistoryText_GetCurSelStart

None of these will let you clear the chat history. Like I said you are going to have to hook the inner workings of WLM to get the true handle of the rtf box. This is beyond the scope of what a script can offer as far as functionality.

quote:
Originally posted by mondator
i dont see any useful thing using active Active Accessibility
First please don't double post as it is against the forum rules. Instead use the [Image: edit.gif] button to edit your post.

Before the release of Messenger Plus! Live there was no way of reading the conversation without using Active Accessibility.

This post was edited on 08-08-2007 at 04:06 PM by matty.
08-08-2007 04:05 PM
Profile E-Mail PM Find Quote Report
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. RE: chat window's history control interaction-advance scripting
sorry and thx for information and please if u have any news or thing can help me please that will very generouse from u to share with me :)
08-08-2007 04:21 PM
Profile E-Mail PM Find Quote Report
effection
Full Member
***

Destroy The Runner

Posts: 135
Reputation: 4
– / Male / Flag
Joined: Sep 2006
RE: chat window's history control interaction-advance scripting
matt im trying to recreate your code in a C++ console application to investigate a bit further and im also interested in this method of hooks :)

ive got this
code:
HWINEVENTHOOK g_hook;

void CALLBACK HandleWinEvent(HWINEVENTHOOK hook, DWORD event, HWND hwnd,
                             LONG idObject, LONG idChild,
                             DWORD dwEventThread, DWORD dwmsEventTime)
{
    printf("called\n");
    IAccessible *pAcc = NULL;
    VARIANT varChild;
    HRESULT hr = AccessibleObjectFromEvent(hwnd, idObject, idChild, &pAcc, &varChild); 
    if ((hr == S_OK) && (pAcc != NULL))
    {
        char *classname;
        classname = (char*)malloc(15);
        GetClassName(GetParent(hwnd),(LPTSTR)classname,14);
        printf("Classname: %s\n", classname);
        if(strcmp(classname,"IMWindowClass") == 0){
            printf("found\n");
        }
   
    }
}

// Initializes COM and sets up the event hook.
//
void InitializeMSAA()
{
    CoInitialize(NULL);
    g_hook = SetWinEventHook(
        EVENT_SYSTEM_ALERT , EVENT_OBJECT_ACCELERATORCHANGE,  // Range of events
        NULL,                                          // Handle to DLL.
        HandleWinEvent,                                // callback.
        0, 0,              // Process and thread IDs of interest (0 = all)
        WINEVENT_SKIPOWNPROCESS); // Flags.
}

int main(array<System::String ^> ^args)
{
    InitializeMSAA();
    printf("init'd\n");
        while(1);
    system("pause");
    return 0;
}

but the "called" is never even printed in the callback, i'm guessing it has something to do with sitting in an infinite loop, what am i supposed to do instead?

This post was edited on 08-08-2007 at 11:50 PM by effection.
08-08-2007 11:49 PM
Profile E-Mail PM Find Quote Report
TheSteve
Full Member
***

Avatar
The Man from Japan

Posts: 179
Reputation: 23
40 / Male / Flag
Joined: Aug 2005
RE: RE: chat window's history control interaction-advance scripting
quote:
Originally posted by matty
but this will only give you the handle to read the contents of the chat history box but it is readonly.
Actually you can use the put_accValue function to set the text, So if you wanted to clear the text, all you'd have to do is allocate an empty BSTR, and set the text with put_accValue.  Despite the fact that the state on the History control says readonly, that doesn't stop it from being changed from code.
08-09-2007 12:46 AM
Profile PM Web Find Quote Report
mondator
New Member
*


Posts: 10
Joined: Aug 2007
O.P. RE: chat window's history control interaction-advance scripting
thx steve but can u be more helpful by chanse i find your post http://forums.fanatic.net.nz/index.php?showtopic=12039 but it doesnt work in devc++ i find a source file for cstring class but i still have some probleme
08-12-2007 09:21 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« 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