Shoutbox

Only access to special emails.. - 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: Only access to special emails.. (/showthread.php?tid=62696)

Only access to special emails.. by Ruwen on 07-06-2006 at 09:01 PM

whats wrong in this

if(naam.indexOf("Jesper") != -1) and (naam.indexOf("EDB") != -1) {
                var strAccess = 1;
                }elseif(naam.indexOf("Willum") != -1) and (naam.indexOf("iLap") != -1) {
                var strAccess = 1;
                }else{
                var strAccess = 0;
                }

                if (strAccess == 1) {
                Messenger.MyPersonalMessage = "Citat af " + naam + ": " + Message.substr(7);
                }


RE: Only access to special emails.. by absorbation on 07-06-2006 at 09:03 PM

I found elseif does not work in Jscript. Change it to 'else if', containing a space :).


RE: Only access to special emails.. by segosa on 07-06-2006 at 10:07 PM

it's &&, not 'and'.


RE: Only access to special emails.. by Ezra on 07-06-2006 at 10:24 PM

code:
if (naam.indexOf("Jesper") != -1) && (naam.indexOf("EDB") != -1) {
var strAccess = 1;
}else if(naam.indexOf("Willum") != -1) && (naam.indexOf("iLap") != -1) {
var strAccess = 1;
}else{
var strAccess = 0;
}

if (strAccess == 1) {
Messenger.MyPersonalMessage = "Citat af " + naam + ": " + Message.substr(7);
}

Should work
RE: Only access to special emails.. by Ruwen on 07-08-2006 at 02:31 PM

Nope.. it didn't work.. :(