What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [?] Detecting when a Plus! Window is closed

[?] Detecting when a Plus! Window is closed
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: [?] Detecting when a Plus! Window is closed
Well, the easiest thing would be to create all possible Destroyed events and those can then check whether they have been created by that main window and then do something.

Here's an idea:
Javascript code:
// Stores the created window
var oCreatedWnd;
// Array of window IDs in the combo box
var oWndIds = [ "WndOne", "WndTwo", "WndThree" ];
 
// Creates the new window, pass the main window as parameter
function CreateTheWindow(PlusWnd) {
    var nWndId = PlusWnd.Combo_Gombo_GetCurSel("CmbWindow");
    if( nWndId < 0 ) return;
    var sWndId = oWndIds[nWndId];
 
    oCreatedWnd = MsgPlus.CreateWnd("Interfaces.xml", sWndId);
}
 
// Destroyed event for WndOne
function OnWndOneEvent_Destroyed(PlusWnd, ExitCode) {
    if( PlusWnd === oCreatedWnd ) {
        // Change some text and stuff here
    }
}
 
// Repeat for WndTwo, WndThree,...

Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
10-16-2009 03:33 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[?] Detecting when a Plus! Window is closed - by ryxdp on 10-13-2009 at 08:36 AM
RE: [?] Detecting when a Plus! Window is closed - by matty on 10-13-2009 at 01:17 PM
RE: [?] Detecting when a Plus! Window is closed - by ryxdp on 10-14-2009 at 03:10 AM
RE: [?] Detecting when a Plus! Window is closed - by Matti on 10-14-2009 at 12:08 PM
RE: RE: [?] Detecting when a Plus! Window is closed - by ryxdp on 10-14-2009 at 10:46 PM
RE: RE: [?] Detecting when a Plus! Window is closed - by CookieRevised on 10-16-2009 at 05:47 PM
RE: RE: RE: [?] Detecting when a Plus! Window is closed - by ryxdp on 10-16-2009 at 11:13 PM
RE: [?] Detecting when a Plus! Window is closed - by Matti on 10-16-2009 at 03:33 PM
RE: [?] Detecting when a Plus! Window is closed - by CookieRevised on 10-16-2009 at 11:50 PM
RE: RE: [?] Detecting when a Plus! Window is closed - by ryxdp on 10-17-2009 at 12:06 AM
RE: [?] Detecting when a Plus! Window is closed - by Matti on 10-17-2009 at 08:55 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