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:
puortant
New Member
*


Posts: 7
– / Male / –
Joined: Oct 2010
O.P. status script
hi there


I want script to do thaht
Change my status  to  busy
When I open a conversation



thanks
10-15-2010 02:31 AM
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(Messenger.CurrentChats.Count > 0){
    if(old_status === "") old_status = Messenger.MyStatus;
    Messenger.MyStatus = STATUS_BUSY;
  }
}
 
function OnEvent_ChatWndDestroyed(){
  if(Messenger.CurrentChats.Count === 0){
    Messenger.MyStatus = old_status
    old_status = "";
  }
}


Untested, but should work from what I can tell.

This post was edited on 10-15-2010 at 11:26 AM by Spunky.
<Eljay> "Problems encountered: shit blew up" :zippy:
10-15-2010 09:15 AM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: status script
Spunky what is ChatWnds.count? (Note I am pointing out that it doesn't exist :P)
10-15-2010 11:16 AM
Profile E-Mail PM Find Quote Report
foaly
Senior Member
****

Avatar

Posts: 718
Reputation: 20
38 / Male / Flag
Joined: Jul 2006
RE: status script
quote:
Originally posted by scripting docs
ChatWnds::Count
The ChatWnds::Count property returns the count of ChatWnds contained by this object.

Syntax
This is a read-only property.
[number] Count;
Data Type
A number with a minimum value of 0.

Remarks
The count should not be stored for later use and always requested from the object when needed.

Property Information
Object ChatWnds
Availability Messenger Plus! Live 4.00


So it should be ChatWnds.Count ?
[signature.jpg]
10-15-2010 11:22 AM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: status script
Yes but ChatWnds is not declared. It is
Javascript code:
Messenger.CurrentChats.Count;

10-15-2010 11:23 AM
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
quote:
Originally posted by matty
Yes but ChatWnds is not declared. It is
Javascript code:
Messenger.CurrentChats.Count;



I thought it looked a bit wrong when I did it, but looking in the contacts section of the help file (it's been a while) gave me contacts.count. Maybe it should be explained a bit clearer for people.

Updated original post
<Eljay> "Problems encountered: shit blew up" :zippy:
10-15-2010 11:25 AM
Profile PM Find Quote Report
CookieRevised
Elite Member
*****

Avatar

Posts: 15519
Reputation: 173
– / Male / Flag
Joined: Jul 2003
Status: Away
RE: status script
Maybe, but I find it clear enough as it is though.

ChatWnds is just a name for the type of the object, it is not the object's assigned name.  This is btw exact the same with 'Contacts', and some other objects like the 'DataBloc' object, 'Emoticon' object, 'Emoticons' object, ... The phraeses are also all the same:

quote:
The ChatWnds Object
The ChatWnds object is used to iterate a list of chat windows returned by a function of the API such as Messenger::CurrentChats.

The Contacts Object
The Contacts object is used to iterate a list of contacts returned by a function of the API such as Messenger::MyContacts or ChatWnd::Contacts.

The DataBloc Object
The DataBloc object represents a memory block created by Interop.Allocate.

This is different than global objects. Which are also described just like that. eg:
quote:
The MsgPlus Object
The MsgPlus object is a global object that gives access to various properties and functions related to Messenger Plus!.

The scripting docs were never meant to explain the difference between local and global objects/variables, and the difference between types and names though. It is supposed you have a basic knowledge of scripting.

It could use some very basic examples for each object/property though. Maybe that would take away some of the confusion...
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-15-2010 11:43 AM
Profile PM Find Quote Report
puortant
New Member
*


Posts: 7
– / Male / –
Joined: Oct 2010
O.P. RE: status script
thank you guys

but i want to know how to use it
can you make it like a script file plz
thank you so much Spunky

it is worked now

but I also want

when i close the conversation
return status online
10-21-2010 02:25 AM
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
As soon as you have closed all open conversations, the script will already set your status to what it was before you opened the conversations.
.-= A 'frrrrrrrituurrr' for Wacky =-.
10-21-2010 04:58 AM
Profile PM Find Quote Report
puortant
New Member
*


Posts: 7
– / Male / –
Joined: Oct 2010
O.P. RE: status script
I've tested  this script but my status stil buzy when i closed conversation




Javascript code:
--------------------------------------------------------------------------------

var old_status = "online";

function OnEvent_ChatWndCreated(){
  if(Messenger.CurrentChats.Count > 0){
    if(old_status === "online") old_status = Messenger.MyStatus;
    Messenger.MyStatus = STATUS_BUSY;
  }
}

function OnEvent_ChatWndDestroyed(){
  if(Messenger.CurrentChats.Count === 0){
    Messenger.MyStatus = old_status
    old_status = "online";
  }
}

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


This post was edited on 10-21-2010 at 06:27 AM by puortant.
10-21-2010 06:23 AM
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