Problem in my script ... ( second problem ^^ ) |
Author: |
Message: |
Rekinmalad
New Member
Posts: 12
Joined: Aug 2006
|
O.P. Problem in my script ... ( second problem ^^ )
Hello world !
i'm french so i can't search efficacely ( oh ? xD )
So i need help, i want change the user's status in my script ... the real problem is i don't can't change status so i want think what is the command for change status.
( Sorry for my language, if you don't understand un will use google traduction xD )
This post was edited on 08-29-2006 at 03:32 PM by Rekinmalad.
|
|
08-29-2006 09:38 AM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
|
RE: Change user status
Messenger.MyStatus = <status number>;
If I have remembered that right. The numbers are in the docs.
|
|
08-29-2006 10:39 AM |
|
|
Rekinmalad
New Member
Posts: 12
Joined: Aug 2006
|
O.P. RE: Change user status
Yes, the numbers are in the docs. Thank you, i'm going to test that now ^^
I've a problem, my script bug ...
code: Messenger.MyStatus = 3;
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
if(Message=="/manger"){
notify("Bon appétit ");
return '/all Je vais manger ! A + !';
Messenger.MyStatus = 9;
Debug.Trace("Statut changé en 'lunch' (9)");
}
if(Message=="/dodo"){
notify("Bonne nuit ");
return '/all Je vais coucher ! A + !';
Messenger.MyStatus = 7;
notify("ATTENTION: vous etes toujours en ligne avec le statut Occupé.");
Debug.Trace("Statut changé en 'away' (7)");
}
if(Message=="/fou"){
notify("Vous êtes fou ?!?");
return '/all Je suis fou, tu le savais ?!?';
}
if(Message=="/retour"){
notify("Vraiment content de vous revoir ");
return '/all Je suis de retour !!';
Messenger.MyStatus = 3;
Debug.Trace("Statut changé en 'online' (3)");
}
if(Message=="/occupé"){
notify("Je vous laisse tranquille alors ");
return 'Désolé ... je suis occupé ';
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
}
if(Message=="/occupe"){
notify("Je vous laisse tranquille alors ");
return 'Désolé ... je suis occupé ';
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
}
}
// DIVERS
function notify(msg){
msg = MsgPlus.RemoveFormatCodes(msg);
MsgPlus.DisplayToast("TextsPersos", msg, "Peace And Love ");
}
function OnEvent_Initialize(MessengerStart)
{
notify("Bienvenue ");
Messenger.MyStatus = 3;
Debug.Trace("TEXTPERSOS est lancé. STATUS EN LIGNE");
}
function OnEvent_Uninitialize(MessengerExit)
{
notify("Bye bye ");
Debug.Trace("TEXTPERSOS est arrété.");
}
function OnGetScriptCommands(){
var commands = '<ScriptCommands>';
commands+='<Command>';
commands+='<Name>manger</Name>';
commands+='<Description>Signaler a vos contacts que vous partez manger.</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>dodo</Name>';
commands+='<Description>Signaler a vos contacts que vous partez au dodo.</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>fou</Name>';
commands+='<Description>Signalez a vos contacts que vous êtes complètement fou !</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>retour</Name>';
commands+='<Description>Signalez a vos contacts que vous êtes de retour !</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>occupé</Name>';
commands+='<Description>Signalez a votre contacts que vous êtes occupé !</Description>';
commands+='</Command>';
commands+='</ScriptCommands>';
return commands;
}
This is my script (in french, i'm french ...) but my status doesn't change and i've have not debug box ( it's activated in my prefs ) and for "/dodo", the second notify don't appear ...
PLEASE, HELP ME
|
|
08-29-2006 03:10 PM |
|
|
Felu
Veteran Member
Posts: 2223 Reputation: 72
30 / /
Joined: Apr 2006
Status: Away
|
RE: Problem in my script ... ( second problem ^^ )
code: function OnEvent_ChatWndSendMessage(ChatWnd,Message){
if(Message.substr(0,7) == "/manger"){
notify("Bon appétit ");
Messenger.MyStatus = 9;
Debug.Trace("Statut changé en 'lunch' (9)");
return '/all Je vais manger ! A + !';
}
if(Message.substr(0,5) == "/dodo"){
notify("Bonne nuit ");
Messenger.MyStatus = 7;
notify("ATTENTION: vous etes toujours en ligne avec le statut Occupé.");
Debug.Trace("Statut changé en 'away' (7)");
return '/all Je vais coucher ! A + !';
}
if(Message.substr(0,4) == "/fou"){
notify("Vous êtes fou ?!?");
return '/all Je suis fou, tu le savais ?!?';
}
if(Message.substr(0,7) == "/retour"){
notify("Vraiment content de vous revoir ");
Messenger.MyStatus = 3;
Debug.Trace("Statut changé en 'online' (3)");
return '/all Je suis de retour !!';
}
if(Message.substr(0,7) == "/occupé"){
notify("Je vous laisse tranquille alors ");
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
return 'Désolé ... je suis occupé ';
}
if(Message.substr(0,7) == "/occupe"){
notify("Je vous laisse tranquille alors ");
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
return 'Désolé ... je suis occupé ';
}
}
// DIVERS
function notify(msg){
msg = MsgPlus.RemoveFormatCodes(msg);
MsgPlus.DisplayToast("TextsPersos", msg, "Peace And Love ");
}
function OnEvent_Initialize(MessengerStart)
{
notify("Bienvenue ");
Messenger.MyStatus = 3;
Debug.Trace("TEXTPERSOS est lancé. STATUS EN LIGNE");
}
function OnEvent_Uninitialize(MessengerExit)
{
notify("Bye bye ");
Debug.Trace("TEXTPERSOS est arrété.");
}
function OnGetScriptCommands(){
var commands = '<ScriptCommands>';
commands+='<Command>';
commands+='<Name>manger</Name>';
commands+='<Description>Signaler a vos contacts que vous partez manger.</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>dodo</Name>';
commands+='<Description>Signaler a vos contacts que vous partez au dodo.</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>fou</Name>';
commands+='<Description>Signalez a vos contacts que vous êtes complètement fou !</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>retour</Name>';
commands+='<Description>Signalez a vos contacts que vous êtes de retour !</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>occupé</Name>';
commands+='<Description>Signalez a votre contacts que vous êtes occupé !</Description>';
commands+='</Command>';
commands+='</ScriptCommands>';
return commands;
}
Use that code code. Just make sure everything is done before returning, nothing can be done after returning .
|
|
08-29-2006 03:44 PM |
|
|
Reload2
Full Member
-> The second Reload <-
Posts: 323 Reputation: 16
32 / / –
Joined: Mar 2006
|
|
08-29-2006 04:13 PM |
|
|
RaceProUK
Elite Member
Posts: 6073 Reputation: 57
39 / /
Joined: Oct 2003
|
RE: Problem in my script ... ( second problem ^^ )
quote: Originally posted by Rekinmalad
if(Message=="/manger"){
notify("Bon appétit (Smilie)");
return '/all Je vais manger ! A + !';
Messenger.MyStatus = 9;
Debug.Trace("Statut changé en 'lunch' (9)");
}
You do know what a return statement does, yes?
|
|
08-30-2006 10:05 AM |
|
|
Rekinmalad
New Member
Posts: 12
Joined: Aug 2006
|
O.P. RE: Problem in my script ... ( second problem ^^ )
Oh yes i'm a terrible idiot xD
But the debug box don't appear, and she is activated in my prefs ... strange ...
ah, also, what I have to do to export my script has a *.plsc ?
|
|
08-30-2006 08:45 PM |
|
|
boston
Banned
Posts: 116 Reputation: -8
Joined: Aug 2006
|
RE: Problem in my script ... ( second problem ^^ )
you have to use winAce or Winrar or your plsc zipper
and then post reply or edit and attachments browse
if it doesnt open with msgplus live put it in to a zipped file and put the plsc in there
jope it help
|
|
08-30-2006 08:55 PM |
|
|
matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Problem in my script ... ( second problem ^^ )
Simply create a zip file and rename the .zip to .plsc.
You can use the Windows BuiiltIn zip or WinZIp or WInRAR or WinAce or 7GZip as long as it is a zip file you will be ok.
quote: Originally posted by Rekinmalad
Oh yes i'm a terrible idiot xD
But the debug box don't appear, and she is activated in my prefs ... strange ...
Because when you use return in a function no code after it is executed.
if i want to put something in the debug window i would need to do this
code: function somefunction(){
Debug.Trace('hi');
return 'hi'; // ---- no code is executed after this line
}
This post was edited on 08-30-2006 at 09:09 PM by matty.
|
|
08-30-2006 09:02 PM |
|
|
Rekinmalad
New Member
Posts: 12
Joined: Aug 2006
|
O.P. RE: Problem in my script ... ( second problem ^^ )
I have changed my code
code: function OnEvent_ChatWndSendMessage(ChatWnd,Message){
if(Message.substr(0,7) == "/manger"){
notify("Bon appétit ");
Messenger.MyStatus = 9;
Debug.Trace("Statut changé en 'lunch' (9)");
return '/all Je vais manger ! A + !';
}
if(Message.substr(0,5) == "/dodo"){
notify("Bonne nuit ");
Messenger.MyStatus = 7;
notify("ATTENTION: vous etes toujours en ligne avec le statut Occupé.");
Debug.Trace("Statut changé en 'away' (7)");
return '/all Je vais coucher ! A + !';
}
if(Message.substr(0,4) == "/fou"){
notify("Vous êtes fou ?!?");
return '/all Je suis fou, tu le savais ?!?';
}
if(Message.substr(0,7) == "/retour"){
notify("Vraiment content de vous revoir ");
Messenger.MyStatus = 3;
Debug.Trace("Statut changé en 'online' (3)");
return '/all Je suis de retour !!';
}
if(Message.substr(0,7) == "/occupé"){
notify("Je vous laisse tranquille alors ");
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
return 'Désolé ... je suis occupé ';
}
if(Message.substr(0,7) == "/occupe"){
notify("Je vous laisse tranquille alors ");
Messenger.MyStatus = 4;
Debug.Trace("Statut changé en 'busy' (4)");
return 'Désolé ... je suis occupé ';
}
}
// DIVERS
function notify(msg){
msg = MsgPlus.RemoveFormatCodes(msg);
MsgPlus.DisplayToast("TextsPersos", msg, "Peace And Love ");
}
function OnEvent_Initialize(MessengerStart)
{
notify("Bienvenue ");
Messenger.MyStatus = 3;
Debug.Trace("TEXTPERSOS est lancé. STATUS EN LIGNE");
}
function OnEvent_Uninitialize(MessengerExit)
{
notify("Bye bye !");
Debug.Trace("TEXTPERSOS est arrété.");
}
function OnGetScriptCommands(){
var commands = '<ScriptCommands>';
commands+='<Command>';
commands+='<Name>manger</Name>';
commands+='<Description>Signaler a vos contacts que vous partez manger.</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>dodo</Name>';
commands+='<Description>Signaler a vos contacts que vous partez au dodo.</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>fou</Name>';
commands+='<Description>Signalez a vos contacts que vous êtes complètement fou !</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>retour</Name>';
commands+='<Description>Signalez a vos contacts que vous êtes de retour !</Description>';
commands+='</Command>';
commands+='<Command>';
commands+='<Name>occupé</Name>';
commands+='<Description>Signalez a votre contacts que vous êtes occupé !</Description>';
commands+='</Command>';
commands+='</ScriptCommands>';
return commands;
}
And the debug box don't appear ^^
|
|
08-30-2006 10:25 PM |
|
|
Pages: (3):
« First
[ 1 ]
2
3
»
Last »
|
|