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

Pages: (2): « First « 1 [ 2 ] Last »
status script
Author: Message:
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: status script
You're not supposed to fill something in in that string variable!
It does not define what status is being set after all the chat windows are closed.
it actually doesn't matter what you fill in there, any random string will do, as long as you keep it the same in all the used strings in the entire script.

------

This said, there is a bug in the script.
  if(Messenger.CurrentChats.Count === 0){
should be
  if(Messenger.CurrentChats.Count === 1){
Reason being that OnEvent_ChatWndDestroyed() is executed _before_ the chat window is destroyed (which is logical, considering it needs to pass the ChatWnd object for the window which is going to be destroyed).

------

and
  if(Messenger.CurrentChats.Count > 0)
isn't needed at all, the number of chats will always be >0 in the OnEvent_ChatWndCreated() event because this event is fired _after_ the chat is created (again logical, because of the same reason above). But this isn't a bug though, it's just redundant code.

------

Thus:
Javascript code:
var old_status = "";
 
function OnEvent_ChatWndCreated() {
    if (old_status === "") old_status = Messenger.MyStatus;
    Messenger.MyStatus = STATUS_BUSY;
}
 
function OnEvent_ChatWndDestroyed() {
  if (Messenger.CurrentChats.Count === 1) {
    Messenger.MyStatus = old_status;
    old_status = "";
  }
}


This post was edited on 10-21-2010 at 07:47 AM by CookieRevised.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-21-2010 07:22 AM
Profile PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: status script
Good points Cookie (as usual)

Just to clarify, you don't have to tell the script to put you back to "online". It remembers what you were before it changed to "busy" and restores it for you automatically. Example being, if you were "Away", it would change to "busy", then back to "away" when you closed all of your chat windows.

"Busy" would stay the same whether or not a chat window was open because of this.
<Eljay> "Problems encountered: shit blew up" :zippy:
10-21-2010 08:56 AM
Profile PM Find Quote Report
puortant
New Member
*


Posts: 7
– / Male / –
Joined: Oct 2010
O.P. RE: RE: status script
quote:
Originally posted by CookieRevised
You're not supposed to fill something in in that string variable!
It does not define what status is being set after all the chat windows are closed.



this script does not work when i dont fill any thing
But he was working when I added "online"  for a quotation mark


I got this message before i add "online"




couldnt  start script

The script may be defective or you may not have the proper pivileges to
run scripts
10-21-2010 12:16 PM
Profile E-Mail PM Find Quote Report
puortant
New Member
*


Posts: 7
– / Male / –
Joined: Oct 2010
O.P. RE: status script
i have fix my problme now

thank you so much guys
10-21-2010 12:32 PM
Profile E-Mail PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: status script
quote:
Originally posted by puortant
quote:
Originally posted by CookieRevised
You're not supposed to fill something in in that string variable!
It does not define what status is being set after all the chat windows are closed.
this script does not work when i dont fill any thing
But he was working when I added "online"  for a quotation mark

I got this message before i add "online":

couldnt  start script
The script may be defective or you may not have the proper pivileges to
run scripts
That is not possible.
It would have worked in exactly the same way as if you didn't entered "online".

The first time you probably did something wrong when copying the script. That's the only reason why you could have got that error message.



quote:
Originally posted by puortant
i have fix my problme now
(y)
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-21-2010 01:46 PM
Profile PM Find Quote Report
puortant
New Member
*


Posts: 7
– / Male / –
Joined: Oct 2010
O.P. RE: status script
it is working now :)

But I want to modify this script..( if you want).
whenI'm appear offline
I do not want to change my status to buzy when i open conversation

i am very sorry if I disturbed you


10-21-2010 10:14 PM
Profile E-Mail PM Find Quote Report
Spunky
Former Super Mod
*****

Avatar

Posts: 3658
Reputation: 61
35 / Male / Flag
Joined: Aug 2006
RE: status script
Javascript code:
var old_status = "";
 
function OnEvent_ChatWndCreated() {
    if (old_status === "") old_status = Messenger.MyStatus;
    if (Messenger.MyStatus != STATUS_INVISIBLE) Messenger.MyStatus = STATUS_BUSY;
}
 
function OnEvent_ChatWndDestroyed() {
  if (Messenger.CurrentChats.Count === 1) {
    if (Messenger.MyStatus != STATUS_INVISIBLE) Messenger.MyStatus = old_status;
    old_status = "";
  }
}

<Eljay> "Problems encountered: shit blew up" :zippy:
10-22-2010 07:46 AM
Profile PM Find Quote Report
puortant
New Member
*


Posts: 7
– / Male / –
Joined: Oct 2010
O.P. RE: status script
Thank you alot
10-22-2010 12:23 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« 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