What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [help] function OnEvent_MenuClicked with window already open

[help] function OnEvent_MenuClicked with window already open
Author: Message:
LifelesS
Full Member
***


Posts: 115
Reputation: 4
31 / Male / Flag
Joined: Dec 2006
O.P. [help] function OnEvent_MenuClicked with window already open
Does anyone knows a function that if a Interface Windows is already open, don't open it again?

I'll explain. If you open a Interface Windows, go back to the menu and open it again, it will open 2 windows.
Best Regards,
Joćo Godinho
01-28-2007 01:44 PM
Profile E-Mail PM Find Quote Report
NanaFreak
Scripting Contest Winner
*****


Posts: 1476
Reputation: 53
32 / Male / Flag
Joined: Jul 2006
RE: [help] function OnEvent_MenuClicked with window already open
function OnEvent_MenuClicked(MenuId){
if(MenuId=="123" && blah != true){
//open window
blah = true
}
}

i think that shoutd do it for you ;)

This post was edited on 01-28-2007 at 01:50 PM by NanaFreak.
01-28-2007 01:49 PM
Profile PM Find Quote Report
Felu
Veteran Member
*****


Posts: 2223
Reputation: 72
29 / Male / Flag
Joined: Apr 2006
Status: Away
RE: [help] function OnEvent_MenuClicked with window already open
Declare the Window as a global variable and then if the window is open the variable shall return true else false. So
code:
var Wnd;//Declaring as global variable
/* Event */
if(!Wnd){
/* Open Window/*
}

01-28-2007 01:50 PM
Profile E-Mail PM Web Find Quote Report
LifelesS
Full Member
***


Posts: 115
Reputation: 4
31 / Male / Flag
Joined: Dec 2006
O.P. RE: [help] function OnEvent_MenuClicked with window already open
Thanks NanaFreak and Felu, I got it working with Felu method.

I also added an OnWindowIDEvent_Destroyed() { Wnd = null; }

or it doesn't work when you actually close the window lol
Best Regards,
Joćo Godinho
01-28-2007 01:57 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