What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Fast & Simple Away/Busy System :)

[Request] Fast & Simple Away/Busy System :)
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15517
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: [Request] Fast & Simple Away/Busy System :)
If a global variable is 'undefined' when you read it inside a function it is most likely not a global variable in the first place or wrongly declared to begin with.

Seeing some of your code, you indeed have some trouble with that.
Remember that every variable you use must be declared first. If you don't do that JScript will do it for you but this makes bad code and is prone to mistakes and confussion (as shown in your code with the 'Window' variable.)

The first time you use a variable make it a habit to always declare it using the 'var' statement. Depending on where this var statement occurs it is a global variable (when the declaration is done outside a function) or a local variable (when it is done inside the function; and this means the variable will only be valid inside this function).

Also don't confuse parameters of funtions with variables, those are two different things (again refering to the use of the 'Window' variable inside the OnMainEvent_CtrlClicked function which is of no need since 1) it isn't delcared properly and 2) the function already passed the window object as a variable).

------------

Your script has, besides the stuff I already said, other issues as well.

Eg: when contacts are added or removed from the contact list, your script will leave entries for those contacts in the registry or even malfunction.

Eg: In convo's with multiple contacts your script doesn't behave as intended.

------------

PS: also the XML file has same strange things in it, making me believe you copied it from somewhere else maybe (?)...

No need for the global colors definition.
Also the name value of the interfaces tag seems a bit strange...

------------

Attached is the rewritten and optimized script (without the use of timers and registry (and also compatible with Plus!3 format codes)).

If you wish you can take a look at it, and use it. If you don't wish and want to do it all yourself first, ignore it for now ;)

EDIT: updated, editing 1 line to be even more shorter....

.plsc File Attachment: Away-Busy.plsc (3.09 KB)
This file has been downloaded 328 time(s).

This post was edited on 08-19-2006 at 12:47 PM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
08-12-2006 01:13 PM
Profile PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] Fast & Simple Away/Busy System :) - by artfuldodga on 08-08-2006 at 06:23 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-08-2006 at 06:38 PM
RE: [Request] Fast & Simple Away/Busy System :) - by artfuldodga on 08-08-2006 at 06:39 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-09-2006 at 03:40 PM
RE: [Request] Fast & Simple Away/Busy System :) - by problem-solver-wlm on 08-09-2006 at 03:46 PM
RE: [Request] Fast & Simple Away/Busy System :) - by RaceProUK on 08-09-2006 at 03:49 PM
RE: [Request] Fast & Simple Away/Busy System :) - by artfuldodga on 08-09-2006 at 04:45 PM
RE: [Request] Fast & Simple Away/Busy System :) - by problem-solver-wlm on 08-09-2006 at 06:53 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-09-2006 at 06:54 PM
RE: [Request] Fast & Simple Away/Busy System :) - by cloudhunter on 08-09-2006 at 06:55 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-09-2006 at 07:09 PM
RE: RE: [Request] Fast & Simple Away/Busy System :) - by CookieRevised on 08-12-2006 at 09:09 AM
RE: [Request] Fast & Simple Away/Busy System :) - by problem-solver-wlm on 08-09-2006 at 07:19 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-09-2006 at 07:20 PM
RE: [Request] Fast & Simple Away/Busy System :) - by artfuldodga on 08-09-2006 at 08:00 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-09-2006 at 08:41 PM
RE: [Request] Fast & Simple Away/Busy System :) - by artfuldodga on 08-09-2006 at 08:46 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-11-2006 at 05:15 PM
RE: [Request] Fast & Simple Away/Busy System :) - by artfuldodga on 08-11-2006 at 05:30 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-11-2006 at 05:33 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-12-2006 at 11:58 AM
RE: [Request] Fast & Simple Away/Busy System :) - by CookieRevised on 08-12-2006 at 01:13 PM
RE: [Request] Fast & Simple Away/Busy System :) - by Spunky on 08-12-2006 at 03:33 PM
RE: RE: [Request] Fast & Simple Away/Busy System :) - by CookieRevised on 08-12-2006 at 05:37 PM
RE: [Request] Fast & Simple Away/Busy System :) - by artfuldodga on 08-12-2006 at 04:58 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