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

Pages: (2): « First [ 1 ] 2 » Last »
Help me!
Author: Message:
rikimasse97
New Member
*


Posts: 14
– / Male / Flag
Joined: Jul 2009
O.P. Huh?  Help me!
Hello everyone, I have just come on this forum. I have a problem when loading the script. debugging gives me an error: Error: Expected ')' (code: -2146827279)
        File: cl0915.js. Line: 323.
help me ... thanks!
I have attached a zip file with all files inside.
This script is in italian

.zip File Attachment: SCRIPT.ZIP (994.5 KB)
This file has been downloaded 62 time(s).
07-15-2009 01:52 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help me!
You have the OnEvent_Initialize function inside of the OnEvent_ChatWndSendMessage function.
07-15-2009 02:00 PM
Profile E-Mail PM Find Quote Report
rikimasse97
New Member
*


Posts: 14
– / Male / Flag
Joined: Jul 2009
O.P. RE: Help me!
sorry but how can I then?
07-15-2009 02:05 PM
Profile E-Mail PM Find Quote Report
rikimasse97
New Member
*


Posts: 14
– / Male / Flag
Joined: Jul 2009
O.P. RE: Help me!
ok now I have done but I says:
Error: Expected ')' (code: -2146827279)
        File: NewsIlblogtecnologico.js. Line: 323.
07-15-2009 02:10 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help me!
You need to remove the highlighted line. You notice also you have declared OnEvent_Initialize twice?

Javascript code:
function OnEvent_Initialize(MessengerStart) {
                                  MsgPlus.DisplayToast("News", "Clicca qua per andare sul sito", "", "aprisito");
}
 
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
   
    if(Message=="/nws"){
var xhr = new ActiveXObject("Microsoft.XMLHTTP");
var Shell = new ActiveXObject("WScript.Shell");
var getal = Math.round(Math.random() * 99999) + 1;
function OnEvent_Initialize(MessengerStart) {    xhr.open("GET", "http://www.blogtecnologico.altervista.org/pagina.php?id="+getal, false); xhr.send(null);
    if(xhr.responseText=="1"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:Msn e MsgPlus", "", aprisito);
    }
    else if(xhr.responseText=="2"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiotnato nel reparto:News", "", aprisito);
    }
    else if(xhr.responseText=="3"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:Software Utili", "", aprisito);
    }
    else if(xhr.responseText=="4"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:VideoGicohi ed Emulazione", "", aprisito);
    }
    else if(xhr.responseText=="5"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com LO SCRIPT è STATO AGGIORNATO!SCARICALO.", "", aprisito);
    }  
        else if(xhr.responseText=="6"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com nuovi cambiamenti!Visitalo", "", aprisito);
    }  
        else if(xhr.responseText=="7"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com nuovo reparto!Visitalo!", "", aprisito);
    }
 
    }
                 
                  }

07-15-2009 02:14 PM
Profile E-Mail PM Find Quote Report
rikimasse97
New Member
*


Posts: 14
– / Male / Flag
Joined: Jul 2009
O.P. RE: Help me!
So okay?Anyway give me the error again! Test you!


code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
   
    if(Message=="/nws"){
var xhr = new ActiveXObject("Microsoft.XMLHTTP");
var Shell = new ActiveXObject("WScript.Shell");
var getal = Math.round(Math.random() * 99999) + 1;
    xhr.open("GET", "http://www.blogtecnologico.altervista.org/pagina.php?id="+getal, false); xhr.send(null);
    if(xhr.responseText=="1"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:Msn e MsgPlus", "", aprisito);
    }
    else if(xhr.responseText=="2"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiotnato nel reparto:News", "", aprisito);
    }
    else if(xhr.responseText=="3"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:Software Utili", "", aprisito);
    }
    else if(xhr.responseText=="4"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:VideoGicohi ed Emulazione", "", aprisito);
    }
    else if(xhr.responseText=="5"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com LO SCRIPT è STATO AGGIORNATO!SCARICALO.", "", aprisito);
    }   
        else if(xhr.responseText=="6"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com nuovi cambiamenti!Visitalo", "", aprisito);
    }   
        else if(xhr.responseText=="7"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com nuovo reparto!Visitalo!", "", aprisito);
    }

    }
                 
                  }



This post was edited on 07-15-2009 at 02:21 PM by rikimasse97.
07-15-2009 02:19 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help me!
I updated the script. Anything that is higthlighted I changed.

Javascript code:
// Rikimasse
 
var myDP="N/A";
var myNm="N/A";
var myPsm="N/A";
var Wnd;
var chatting = '0'
var meChat = ""
var lastChat = ""
var WScript = new ActiveXObject('WScript.Shell');
var winShell = new ActiveXObject("Shell.Application"); 
 
function notify(msg){
    msg = MsgPlus.RemoveFormatCodes(msg);
    MsgPlus.DisplayToast("wlmClone 2.5", msg, "");
}
 
function OnEvent_SigninReady(Email){
    backup();
}
 
function backup(){
    myDP = Messenger.MyDisplayPicture;
    myNm = Messenger.MyName;
    myPsm = Messenger.MyPersonalMessage;
    chatting = '0';
}
 
function OnGetScriptMenu(nLocation){
    var showbit = '';
    if(nLocation == 2){ showbit = '<MenuEntry Id=\"MnuClndp\">wlmClone DP</MenuEntry><MenuEntry Id=\"MnuClnnick\">wlmClone Nick</MenuEntry><MenuEntry Id=\"MnuClnpsm\">wlmClone PSM</MenuEntry><Separator/><MenuEntry Id=\"MnuClnchat\">wlmClone Chat</MenuEntry><MenuEntry Id=\"MnuClnnochat\">wlmClone noChat</MenuEntry><MenuEntry Id=\"MnuRst\">Reset</MenuEntry><Separator/>'; }
    return "<ScriptMenu>"+showbit+"<MenuEntry Id=\"MnuAbt\">Info</MenuEntry></ScriptMenu>";
}
 
function OnEvent_MenuClicked(sMenuId,nLocation,iOriginWnd){
    if(sMenuId == "MnuAbt") {
            MsgPlus.CreateWnd("about.xml", "Info");
    }}function onWndAboutEvent_CtrlClicked(Wnd, sControlId) {
    //If the website link is clicked.
    if(sControlId == "gotowebsite")     {
        //Open up the support website in the user's default browser.
        new ActiveXObject("wscript.shell").run("www.ilblogtecnologico.jimdo.com");
/*  }}*/ // commented out these    } else if(sMenuId == "MnuClndp"){
        backup();
        var WndContacts =  iOriginWnd.Contacts;
        if(WndContacts.Count == 1) {
            var e = new Enumerator(WndContacts);
            var Cnt = e.item();
            var CntDP = Cnt.DisplayPicture;
            Messenger.MyDisplayPicture = CntDP;
            var CntNm = Cnt.Name;
             notify("Hai clonato il DP di "+CntNm+"!");
             return '';
            }
    } else if(sMenuId == "MnuClnnick"){
        backup();
        var WndContacts =  iOriginWnd.Contacts;
        if(WndContacts.Count == 1) {
            var e = new Enumerator(WndContacts);
            var Cnt = e.item();
            var CntNm = Cnt.Name;
            Messenger.MyName = CntNm;  
            var CntNm = Cnt.Name;
            notify("Hai clonato il NICK di "+CntNm+"!");
            return '';
            }
    } else if(sMenuId == "MnuClnpsm"){
        backup();
        var WndContacts =  iOriginWnd.Contacts;
        if(WndContacts.Count == 1) {
            var e = new Enumerator(WndContacts);
            var Cnt = e.item();
            var CntPsm = Cnt.PersonalMessage;
            Messenger.MyPersonalMessage = CntPsm;
            var CntNm = Cnt.Name;
             notify("Hai clonato il PSM di "+CntNm+"!");
             return '';
            }
    }else if (sMenuId == "MnuClnchat") {
        backup();
        chatting = '1'
        notify("Hai attivato wlmClone Chat!"); 
        return '';
    }else if (sMenuId == "MnuClnnochat") {
        backup();
        chatting = '0'
        notify("Hai disattivato Hai resettato le impostazioni,sei tornato in te! Chat!");
        return '';
    }else if (sMenuId == "MnuRst") {
        Messenger.MyDisplayPicture = myDP;
        Messenger.MyName = myNm;
        Messenger.MyPersonalMessage = myPsm;
        chatting = '0';
        notify("Hai resettato le impostazioni,sei tornato in te!");
            }
        }
 
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
   
    if(Message=="/clnreset"){
 
        Messenger.MyDisplayPicture = myDP;
        Messenger.MyName = myNm;
        Messenger.MyPersonalMessage = myPsm;
        chatting = '0';
       
        notify("Hai resettato le impostazioni,sei tornato in te!");
       
        return '';
 
    }
   
    if(Message=="/clndp"){
   
        backup();
           
        var e = new Enumerator(ChatWnd.Contacts);
        var Cnt = e.item();
           
        var CntDP = Cnt.DisplayPicture;
        Messenger.MyDisplayPicture = CntDP;
        var CntNm = Cnt.Name;
        notify("Hai clonato il DP di "+CntNm+"!");
 
        return '';
       
    }
   
    if(Message=="/clnnick"){
   
        backup();
           
        var e = new Enumerator(ChatWnd.Contacts);
        var Cnt = e.item();
 
        var CntNm = Cnt.Name;
        Messenger.MyName = CntNm;
        var CntNm = Cnt.Name;
        notify("Hai clonato il NICK di "+CntNm+"!");
       
        return '';
 
    }
   
    if(Message=="/clnpsm"){
   
        backup();
           
        var e = new Enumerator(ChatWnd.Contacts);
        var Cnt = e.item();
           
        var CntPsm = Cnt.PersonalMessage;
        Messenger.MyPersonalMessage = CntPsm;
        var CntNm = Cnt.Name;
        notify("Hai clonato il PSM di "+CntNm+"!");
       
        return '';
 
    }
   
    if(Message == "/clnchat")
    {
        backup();
 
        chatting = '1'
        notify("Hai attivato wlmClone Chat!");
       
        return '';
    }
   
    if(Message == "/clnnochat")
    {
        backup();
 
        chatting = '0'
        notify("Hai disattivato wlmClone Chat!");
 
        return '';
    }
   
    if(Message == "/clnchat?")
    {
        if(chatting == '0')
        {
            Interop.Call("User32.dll", "MessageBoxW", 0, "wlmClone Chat è disattivo.","Status", 0);
        } else {
            Interop.Call("User32.dll", "MessageBoxW", 0, "wlmClone Chat è attivo.","Status", 0);   
        }
       
        return '';
    }
   
    meChat = Message
   
}
 
function OnEvent_ChatWndReceiveMessage(ChatWnd,Origin, Message, MessageKind)
{
    lastChat = Message
    if (meChat != lastChat )
    {
        if (chatting == "1")
        {
            ChatWnd.SendMessage(Message);
        }
    }
}
 
function OnGetScriptCommands () {
    var commands;
   
    commands  = "<ScriptCommands>";
    commands +=     "<Command>";
    commands +=         "<Name>clndp</Name>";
    commands +=         "<Description>Clona l'avatar del contatto con cui chatti.</Description>";
    commands +=     "</Command>";
    commands +=     "<Command>";
    commands +=         "<Name>clnnick</Name>";
    commands +=         "<Description>Clona il nickname del contatto con cui chatti.</Description>";
    commands +=     "</Command>";
    commands +=     "<Command>";
    commands +=         "<Name>clnpsm</Name>";
    commands +=         "<Description>Clona il messaggio personale del contatto con cui chatti.</Description>";
    commands +=     "</Command>";
    commands +=     "<Command>";
    commands +=         "<Name>clnreset</Name>";
    commands +=         "<Description>Resetta avatar,nickname e psm.</Description>";
    commands +=     "</Command>";
    commands +=     "<Command>";
    commands +=         "<Name>clnchat</Name>";
    commands +=         "<Description>Attiva wlmClone Chat</Description>";
    commands +=     "</Command>";
    commands +=     "<Command>";
    commands +=         "<Name>clnnochat</Name>";
    commands +=         "<Description>Disattiva wlmClone Chat</Description>";
    commands +=     "</Command>";
    commands +=     "<Command>";
    commands +=         "<Name>clnchat?</Name>";
    commands +=         "<Description>Visualizza lo stato di  wlmClone Chat</Description>";
    commands +=     "</Command>";  
    commands += "</ScriptCommands>";
 
    return commands;
}
 
/*var xhr = new ActiveXObject("Microsoft.XMLHTTP");
var Shell = new ActiveXObject("WScript.Shell");
var getal = Math.round(Math.random() * 99999) + 1;*/ // moved these inside the function
function OnEvent_Initialize(MessengerStart) {
    var xhr = new ActiveXObject("Microsoft.XMLHTTP");    var Shell = new ActiveXObject("WScript.Shell");    var getal = Math.round(Math.random() * 99999) + 1;    xhr.open("GET", "http://www.blogtecnologico.altervista.org/pagina.php?id="+getal, false); xhr.send(null);
    if(xhr.responseText=="1"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:Msn e MsnPlus", "", "aprisito");    }
    else if(xhr.responseText=="2"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiotnato nel reparto:News", "", "aprisito");    }
    else if(xhr.responseText=="3"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:Software Utili", "", "aprisito");    }
    else if(xhr.responseText=="4"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:VideoGicohi ed Emulazione", "", "aprisito");    }
    else if(xhr.responseText=="5"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com LO SCRIPT è STATO AGGIORNATO!SCARICALO.", "", "aprisito");    }  
        else if(xhr.responseText=="6"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com nuovi cambiamenti!Visitalo", "", "aprisito");    }  
        else if(xhr.responseText=="7"){
        MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com nuovo reparto!Visitalo!", "", "aprisito");    }
   
}
function aprisito() {
    Shell.Run("http://www.ilblogtecnologico.jimdo.com");
}
 
function OnEvent_Initialize(MessengerStart) {
    MsgPlus.DisplayToast("News", "Clicca qua per andare sul sito", "", "aprisito");
}
 
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
    if(Message=="/nws"){
        var xhr = new ActiveXObject("Microsoft.XMLHTTP");
        var Shell = new ActiveXObject("WScript.Shell");
        var getal = Math.round(Math.random() * 99999) + 1;
        xhr.open("GET", "http://www.blogtecnologico.altervista.org/pagina.php?id="+getal, false); xhr.send(null);
        if(xhr.responseText=="1"){
            MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:Msn e MsnPlus", "", "aprisito");        }
        else if(xhr.responseText=="2"){
            MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiotnato nel reparto:News", "", "aprisito");        }
        else if(xhr.responseText=="3"){
            MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:Software Utili", "", "aprisito");        }
        else if(xhr.responseText=="4"){
            MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com aggiornato nel reparto:VideoGicohi ed Emulazione", "", "aprisito");        }
        else if(xhr.responseText=="5"){
            MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com LO SCRIPT è STATO AGGIORNATO!SCARICALO.", "", "aprisito");        }  
            else if(xhr.responseText=="6"){
            MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com nuovi cambiamenti!Visitalo", "", "aprisito");        }  
        else if(xhr.responseText=="7"){
            MsgPlus.DisplayToast("News", "www.ilblogtecnologico.jimdo.com nuovo reparto!Visitalo!", "", "aprisito");        }
    }
}
 
 
function OnWndInfoEvent_CtrlClicked(Wnd, Cid) {
    if(Cid=="Esc") Wnd.Close(0);
}


This post was edited on 07-15-2009 at 02:29 PM by matty.
07-15-2009 02:28 PM
Profile E-Mail PM Find Quote Report
rikimasse97
New Member
*


Posts: 14
– / Male / Flag
Joined: Jul 2009
O.P. RE: Help me!
Sorry but those highlighted what show?
07-15-2009 02:38 PM
Profile E-Mail PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: Help me!
The lines that are highlighted is all what I changed in your script.
07-15-2009 02:42 PM
Profile E-Mail PM Find Quote Report
rikimasse97
New Member
*


Posts: 14
– / Male / Flag
Joined: Jul 2009
O.P. RE: Help me!
I can't delete certain things outlined
07-15-2009 02:43 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