Help me! - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Thread: Help me! (/showthread.php?tid=91481)
Help me! by rikimasse97 on 07-15-2009 at 01:52 PM
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
RE: Help me! by matty on 07-15-2009 at 02:00 PM
You have the OnEvent_Initialize function inside of the OnEvent_ChatWndSendMessage function.
RE: Help me! by rikimasse97 on 07-15-2009 at 02:05 PM
sorry but how can I then?
RE: Help me! by rikimasse97 on 07-15-2009 at 02:10 PM
ok now I have done but I says:
Error: Expected ')' (code: -2146827279)
File: NewsIlblogtecnologico.js. Line: 323.
RE: Help me! by matty on 07-15-2009 at 02:14 PM
You need to remove the highlighted line. You notice also you have declared OnEvent_Initialize twice?
js code:
RE: Help me! by rikimasse97 on 07-15-2009 at 02:19 PM
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 repartooftware 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);
}
}
}
RE: Help me! by matty on 07-15-2009 at 02:28 PM
I updated the script. Anything that is higthlighted I changed.
js code:
RE: Help me! by rikimasse97 on 07-15-2009 at 02:38 PM
Sorry but those highlighted what show?
RE: Help me! by matty on 07-15-2009 at 02:42 PM
The lines that are highlighted is all what I changed in your script.
RE: Help me! by rikimasse97 on 07-15-2009 at 02:43 PM
I can't delete certain things outlined
RE: Help me! by rikimasse97 on 07-15-2009 at 02:44 PM
okay
RE: Help me! by matty on 07-15-2009 at 02:45 PM
You dont need to delete anything. You had a bunch of brackets missing or where you didnt need them. I fixed the callback pointers for the toasts as well they must be a string not a call to a function.
RE: Help me! by rikimasse97 on 07-15-2009 at 02:49 PM
Still gives me this error: Error: Expected ')' (code: -2146827279)
File: NewsIlblogtecnologico.js. Line: 323.
and the code I copied from what you wrote!: 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 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 repartooftware 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 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 repartooftware 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);
}
RE: Help me! by matty on 07-15-2009 at 02:55 PM
I am not at home so I can't actually debug it but feel free to try this:
js code:
RE: Help me! by rikimasse97 on 07-15-2009 at 03:00 PM
ok then sorry! maybe it again tomorrow now I have to go.
Bye!
Thanks!!!!
however the script does not go yet
RE: Help me! by rikimasse97 on 07-17-2009 at 06:32 AM
hello, I have now solved the problem .. but if I want to send the command does not work:
code:
function OnEvent_ChatWndSendMessage(ChatWnd,Message){
if(Message=="/clnreset"){
MsgPlus.DisplayToast("Title", "Text", "");
return '';
}
RE: Help me! by rikimasse97 on 07-17-2009 at 06:45 AM
problem solved
|