What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Check if window is already open?

Check if window is already open?
Author: Message:
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
32 / Male / Flag
Joined: Apr 2004
RE: Check if window is already open?
Well, the way I do it is by creating a global array where I store all my opened PlusWnd objects in. Then, in my general window creator function, I say that if typeof Wnd[WndId] == "object", it should focus the existing window instead of opening a new one. But you must remember that in all OnWndIdEvent_Destroyed events, you should set the value of the window's member in the array to false, or remove it from the array.

You can see a working example of this in all of my scripts, the most recent is Log Manager, but Countdown Live and Calculator also have such (older) functions. Feel free to copy/modify/mess with the code you need to do this, but please ask for permission if you want to copy some other sh*t. :P

This post was edited on 09-04-2007 at 06:52 PM by Matti.
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
09-04-2007 06:52 PM
Profile E-Mail PM Web Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Check if window is already open? - by Jimbo on 09-04-2007 at 05:16 PM
RE: Check if window is already open? - by Matti on 09-04-2007 at 06:52 PM


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