What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Get chatwindow

Get chatwindow
Author: Message:
SnuZZer
Full Member
***

Avatar

Posts: 114
32 / Male / Flag
Joined: Jun 2006
O.P. Get chatwindow
Hi.
When a item on my list is doubleclicked it shall send a file, but to send a file U need to know which window I'm using right now, but it isn't possible with the function - or is it?

Here is my code:
code:
function OnBibliotekEvent_LstViewDblClicked(Wnd, Id, Handling)
{
    ChatWindowInUse.SendFile(Wnd.LstView_GetItemText("liste",Handling,1));
}

Thanks in advance.
11-30-2006 07:09 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Get chatwindow
You could iterate the chat windows or even pass the chatwnd object (when you enter a command) to a global variable... It is very possible :p
<Eljay> "Problems encountered: shit blew up" :zippy:
11-30-2006 07:15 PM
Profile PM Find Quote Report
SnuZZer
Full Member
***

Avatar

Posts: 114
32 / Male / Flag
Joined: Jun 2006
O.P. RE: Get chatwindow
Hi.
I'm sorry I don't understand. Can you give an example?
11-30-2006 07:29 PM
Profile E-Mail PM Web Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
36 / Male / Flag
Joined: Aug 2006
RE: Get chatwindow
[code]var CurrentChat;

function OnEvent_ChatWndSendMessage(ChatWnd, Message){
    if(Message=="/command"){
        CurrentChat = ChatWnd;
        MsgPlus.CreateWnd("xmlfile.xml","Bibliotek");
    }
}

function OnBibliotekEvent_LstViewDblClicked(Wnd, Id, Handling){
    CurrentChat.SendFile(Wnd.LstView_GetItemText("liste",Handling,1));
}[code]

This post was edited on 11-30-2006 at 07:36 PM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
11-30-2006 07:34 PM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: Get chatwindow
quote:
Originally posted by SnuZZer
Hi.
I'm sorry I don't understand. Can you give an example?
This is were those "global variables" we talked about here come into play:

look at the CurrentChat variable in SpunkyLoveMuff's script..

When the user enters the command, the OnEvent_ChatWndSendMessage event is fired.

There the CurrentChat variable is set to hold the chatwindow object of the window where that command was entered in (you get that object passed from the OnEvent_ChatWndSendMessage event itself, see ChatWnd parameter).

Then the window with that list is created and when the user double clicks an item in that list, the file is send to the chatwindow object which was set in the CurrentChat variable.

This post was edited on 12-01-2006 at 04:36 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
12-01-2006 04:30 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