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

How to close window
Author: Message:
zeroip
New Member
*


Posts: 9
Joined: Jan 2010
O.P. Huh?  How to close window
code:
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, Message, MsgKind)
{
var strMsg = Message;
if(strMsg.search('youtube.com')!=-1) {
strMsg = strMsg.split('youtube.com')[1];
strMsg = strMsg.split('?v=')[1];
var id = strMsg.split('&')[0];
if(id) {
var thumb_url = 'http://i1.ytimg.com/vi/'+id+'/1.jpg';
var MyWindow = MsgPlus.CreateWnd("Windows.xml", "WndAsk");
}
}
}

function OnWndAskEvent_CtrlClicked(PlusWnd, ControlId) {
    if (ControlId == "Link") {

var MyWindow = MsgPlus.CreateWnd("Windows.xml", "WndVideo");
var WebControl = MyWindow.Browser_GetInterface("BroInternet");
WebControl.Navigate2("http://www.youtube.com/watch_popup?v=");
    }
}

How I can close the Window: WndAsk if function OnWndAskEvent_CtrlClicked is activ?
04-02-2010 10:15 PM
Profile E-Mail PM Find Quote Report
roflmao456
Skinning Contest Winner
****

Avatar

Posts: 955
Reputation: 24
29 / Male / Flag
Joined: Nov 2006
Status: Away
RE: How to close window
put the WndAsk CreateWnd function into a global variable and then use the Close function with that global variable :P

code:
var window;

function func1(){
window = MsgPlus.CreateWnd("windows.xml", "somewindow");
}

function func2(){
window.Close(0);
}

...or use the PlusWnd object (didn't see that LOL)

code:
PlusWnd.Close(0);


This post was edited on 04-02-2010 at 10:38 PM by roflmao456.
[quote]
Ultimatess6
: What a noob mod
04-02-2010 10:38 PM
Profile PM Web Find Quote Report
zeroip
New Member
*


Posts: 9
Joined: Jan 2010
O.P. RE: How to close window
Oh thank you =) with PlusWnd.Close() it didnt work but with PlusWnd.Close(0) it do! thx
04-03-2010 05:25 PM
Profile E-Mail 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