What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » Caching which windows have a command enabled

Caching which windows have a command enabled
Author: Message:
MrPickle
New Member
*


Posts: 5
Joined: Nov 2008
O.P. Caching which windows have a command enabled
Here's how I thought to do it, but as I don't have a wide knowledge of JavaScript (Only C++) there may be a better way (hence me asking).

Create an object containing the window's handle and a "command on/off" boolean when a window is created, then add the object to an array of the active windows.

When the command is called, eg; /command on, loop through the array of active windows checking the window's handle to the current array object's handle and check if "command on/off" is false, if it is, set it to true.

Same for /command off except changing true, to false.

When the window is destroyed remove which ever object in the array has the same handle.

Another way I thought to do it is using the windows handle as a string in the array but I'm not sure whether JavaScript supports this. I am unsure of the correct term so here's an example:

jscript code:
var fruit = new Array();
fruit['banana'] = "Yellow";
fruit['apple'] = "Red";
fruit['tomatoe'] = "Red"



11-18-2008 08:14 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
Caching which windows have a command enabled - by MrPickle on 11-18-2008 at 08:14 PM
RE: Caching which windows have a command enabled - by matty on 11-18-2008 at 08:52 PM
RE: Caching which windows have a command enabled - by MrPickle on 11-18-2008 at 09:39 PM
RE: Caching which windows have a command enabled - by Spunky on 11-18-2008 at 10:37 PM
RE: Caching which windows have a command enabled - by MrPickle on 11-18-2008 at 10:48 PM
RE: Caching which windows have a command enabled - by matty on 11-18-2008 at 11:07 PM
RE: Caching which windows have a command enabled - by MrPickle on 11-18-2008 at 11:19 PM
RE: Caching which windows have a command enabled - by Spunky on 11-19-2008 at 01:17 AM
RE: Caching which windows have a command enabled - by MrPickle on 11-19-2008 at 08:25 AM
RE: Caching which windows have a command enabled - by Matti on 11-19-2008 at 12:44 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