Script Work for One Account |
Author: |
Message: |
Eddie
Veteran Member
Posts: 2078 Reputation: 30
32 / /
Joined: Oct 2005
Status: Away
|
O.P. Script Work for One Account
Simple question, what is the code if i want a script to work for a single account only, so it doesn't load / work on others?
...there used to be a signature here
|
|
12-19-2007 03:05 AM |
|
|
MeEtc
Patchou's look-alike
In the Shadow Gallery once again
Posts: 2200 Reputation: 60
38 / /
Joined: Nov 2004
Status: Away
|
RE: Script Work for One Account
for all of the event functions, you'll have to put all of the code within an if statement
code: function OnEvent_Initialize(MessengerStart){
if (Messenger.MyUserId == <your messenger ID>) {
//do stuff
}
}
I cannot hear you. There is a banana in my ear.
|
|
12-19-2007 03:21 AM |
|
|
Eddie
Veteran Member
Posts: 2078 Reputation: 30
32 / /
Joined: Oct 2005
Status: Away
|
O.P. RE: Script Work for One Account
quote: Originally posted by MeEtc
for all of the event functions, you'll have to put all of the code within an if statement
code: function OnEvent_Initialize(MessengerStart){
if (Messenger.MyUserId == <your messenger ID>) {
//do stuff
}
}
So for every function i must do that? :/ isn't there a simpler one that effects the who script? thanks though.
This is the old Replacer script with Animoticons... code: function OnEvent_ChatWndSendMessage(pChatWnd,sMessage){
return sMessage.replace(/:\)/gi,"=)").replace(//gi,"=D").replace(//gi,"=O").replace(//gi,"=P").replace(/:-\#/gi,"=#").replace(/\(h\)/gi,"{h}").replace(/8-\|/gi,"8o)").replace(/\(brb\)/gi,"{brb}").replace(/\^o\)/gi,"=/").replace(//gi,"=S").replace(/:\|/gi,"=|").replace(/:\(/gi,"=(").replace(/:-\*/gi,"=*").replace(/:\$/gi,"=$").replace(/:\@/gi,"=@").replace(/\+o\(/gi,"=o(").replace(/8o\|/gi,"=o|").replace(/\(a\)/gi,"{a}").replace(/\(6\)/g
i,"{6}").replace(/\(co\)/gi,"{co}").replace(/\(e\)/gi,"{e}").replace(/\(t\)/gi,"{t}").replace(/\(i\)/gi,"{i}").replace(/\(mp\)/gi,"{mp}").replace(/\(p\)/gi,"{p}").replace(/\(\~\)/gi,"{~}").replace(/\(o\)/gi,"{o}").replace(/\(um\)/gi,"{um}").replace(/\(\%\)/gi,"{%}").replace(/\(xx\)/gi,"{xx}").replace(/\(au\)/gi,"{au}").replace(/\(ap\)/gi,"{ap}").replace(/\(so\)/gi,"{so}").replace(/\(y\)/gi,"{y}").replace(/\(n\)/gi,"{n}").replace(/\(yn\)/gi,"{yn}
").replace(/\(h5\)/gi,"{h5}").replace(/\(m\)/gi,"{m}").replace(/\(ip\)/gi,"{ip}").replace(/\(\#\)/gi,"{#}").replace(/\(r\)/gi,"{r}").replace(/\(\*\)/gi,"{*2}").replace(/\(st\)/gi,"{st}").replace(/\(pi\)/gi,"{pi}").replace(/\(b\)/gi,"{b}").replace(/\(d\)/gi,"{d}").replace(/\(c\)/gi,"{c}").replace(/\(\&\)/gi,"{dog}").replace(/\(\@\)/gi,"{@}").replace(/\(tu\)/gi,"{tu}").replace(/\(sn\)/gi,"{sn}").replace(/\(bah\)/gi,"{bah}").replace(/\(nah\)/gi,"{n
ah}").replace(/\(l\)/gi,"{l}").replace(/\(u\)/gi,"{u}").replace(/\(k\)/gi,"{k}").replace(/\(f\)/gi,"{f}").replace(/\(w\)/gi,"{w}").replace(/\(z\)/gi,"{z}").replace(/\(x\)/gi,"{x}").replace(/\(\{\)\(\}\)/gi,"{{}}");
}
where would i put the script you provided? lol
This post was edited on 12-19-2007 at 03:36 AM by Eddie.
...there used to be a signature here
|
|
12-19-2007 03:34 AM |
|
|
prashker
Veteran Member
Posts: 5109 Reputation: 104
– / / –
Joined: Mar 2005
Status: Away
|
RE: Script Work for One Account
function OnEvent_Initialize(MessengerStart){
if (Messenger.MyUserId == <your messenger ID>) {
//do stuff (code goes here If I'm not mistaken)
}
}
This post was edited on 12-19-2007 at 03:37 AM by prashker.
|
|
12-19-2007 03:37 AM |
|
|
Eddie
Veteran Member
Posts: 2078 Reputation: 30
32 / /
Joined: Oct 2005
Status: Away
|
O.P. RE: Script Work for One Account
quote: Originally posted by SonicSam
function OnEvent_Initialize(MessengerStart){
if (Messenger.MyUserId == <your messenger ID>) {
//do stuff (code goes here If I'm not mistaken)
}
}
I keep getting an error with the script, here is what i did, i am a serious scripting nub sorry... code: function OnEvent_Initialize(MessengerStart){
if (Messenger.MyUserId == <my email addy>) {
function OnEvent_ChatWndSendMessage(pChatWnd,sMessage){
return sMessage.replace(/:\)/gi,"=)").replace(//gi,"=D").replace(//gi,"=O").replace(//gi,"=P").replace(/:-\#/gi,"=#").replace(/\(h\)/gi,"{h}").replace(/8-\|/gi,"8o)").replace(/\(brb\)/gi,"{brb}").replace(/\^o\)/gi,"=/").replace(//gi,"=S").replace(/:\|/gi,"=|").replace(/:\(/gi,"=(").replace(/:-\*/gi,"=*").replace(/:\$/gi,"=$").replace(/:\@/gi,"=@").replace(/\+o\(/gi,"=o(").replace(/8o\|/gi,"=o|").replace(/\(a\)/gi,"{a}").replace(/\(6\)/g
i,"{6}").replace(/\(co\)/gi,"{co}").replace(/\(e\)/gi,"{e}").replace(/\(t\)/gi,"{t}").replace(/\(i\)/gi,"{i}").replace(/\(mp\)/gi,"{mp}").replace(/\(p\)/gi,"{p}").replace(/\(\~\)/gi,"{~}").replace(/\(o\)/gi,"{o}").replace(/\(um\)/gi,"{um}").replace(/\(\%\)/gi,"{%}").replace(/\(xx\)/gi,"{xx}").replace(/\(au\)/gi,"{au}").replace(/\(ap\)/gi,"{ap}").replace(/\(so\)/gi,"{so}").replace(/\(y\)/gi,"{y}").replace(/\(n\)/gi,"{n}").replace(/\(yn\)/gi,"{yn}
").replace(/\(h5\)/gi,"{h5}").replace(/\(m\)/gi,"{m}").replace(/\(ip\)/gi,"{ip}").replace(/\(\#\)/gi,"{#}").replace(/\(r\)/gi,"{r}").replace(/\(\*\)/gi,"{*2}").replace(/\(st\)/gi,"{st}").replace(/\(pi\)/gi,"{pi}").replace(/\(b\)/gi,"{b}").replace(/\(d\)/gi,"{d}").replace(/\(c\)/gi,"{c}").replace(/\(\&\)/gi,"{dog}").replace(/\(\@\)/gi,"{@}").replace(/\(tu\)/gi,"{tu}").replace(/\(sn\)/gi,"{sn}").replace(/\(bah\)/gi,"{bah}").replace(/\(nah\)/gi,"{n
ah}").replace(/\(l\)/gi,"{l}").replace(/\(u\)/gi,"{u}").replace(/\(k\)/gi,"{k}").replace(/\(f\)/gi,"{f}").replace(/\(w\)/gi,"{w}").replace(/\(z\)/gi,"{z}").replace(/\(x\)/gi,"{x}").replace(/\(\{\)\(\}\)/gi,"{{}}");
})
}
}
This post was edited on 12-19-2007 at 03:41 AM by Eddie.
...there used to be a signature here
|
|
12-19-2007 03:40 AM |
|
|
davidpolitis
Full Member
Posts: 371 Reputation: 16
Joined: Aug 2006
|
RE: Script Work for One Account
Not everything's exactly working but I've spent enough time on it, lol.
code: function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (Messenger.MyEmail == "YOUR EMAIL")
{
Message = Message.replace(/:\)/gi,"=)");
Message = Message.replace(/(:D)/gi,"=D");
Message = Message.replace(/(:O)/gi,"=O");
Message = Message.replace(/(:P)/gi,"=P");
Message = Message.replace(/:-\#/gi,"=#");
Message = Message.replace(/\(h\)/gi,"{h}");
Message = Message.replace(/8-\|/gi,"8o)");
Message = Message.replace(/\(brb\)/gi,"{brb}");
Message = Message.replace(/\^o\)/gi,"=/");
Message = Message.replace(/(Smilie)/gi,"=S");
Message = Message.replace(/:\|/gi,"=|");
Message = Message.replace(/:\(/gi,"=(");
Message = Message.replace(/:-\*/gi,"=*");
Message = Message.replace(/:\$/gi,"=$");
Message = Message.replace(/:\@/gi,"=@");
Message = Message.replace(/\+o\(/gi,"=o(");
Message = Message.replace(/8o\|/gi,"=o|");
Message = Message.replace(/\(a\)/gi,"{a}");
Message = Message.replace(/\(6\)/gi,"{6}");
Message = Message.replace(/\(co\)/gi,"{co}");
Message = Message.replace(/\(e\)/gi,"{e}");
Message = Message.replace(/\(t\)/gi,"{t}");
Message = Message.replace(/\(i\)/gi,"{i}");
Message = Message.replace(/\(mp\)/gi,"{mp}");
Message = Message.replace(/\(p\)/gi,"{p}");
Message = Message.replace(/\(\~\)/gi,"{~}");
Message = Message.replace(/\(o\)/gi,"{o}");
Message = Message.replace(/\(um\)/gi,"{um}");
Message = Message.replace(/\(\%\)/gi,"{%}");
Message = Message.replace(/\(xx\)/gi,"{xx}");
Message = Message.replace(/\(au\)/gi,"{au}");
Message = Message.replace(/\(ap\)/gi,"{ap}");
Message = Message.replace(/\(so\)/gi,"{so}");
Message = Message.replace(/\(y\)/gi,"{y}");
Message = Message.replace(/\(n\)/gi,"{n}");
Message = Message.replace(/\(yn\)/gi,"{yn}");
Message = Message.replace(/\(h5\)/gi,"{h5}");
Message = Message.replace(/\(m\)/gi,"{m}");
Message = Message.replace(/\(ip\)/gi,"{ip}");
Message = Message.replace(/\(\#\)/gi,"{#}");
Message = Message.replace(/\(r\)/gi,"{r}");
Message = Message.replace(/\(\*\)/gi,"{*2}");
Message = Message.replace(/\(st\)/gi,"{st}");
Message = Message.replace(/\(pi\)/gi,"{pi}");
Message = Message.replace(/\(b\)/gi,"{b}");
Message = Message.replace(/\(d\)/gi,"{d}");
Message = Message.replace(/\(c\)/gi,"{c}");
Message = Message.replace(/\(\&\)/gi,"{dog}");
Message = Message.replace(/\(\@\)/gi,"{@}");
Message = Message.replace(/\(tu\)/gi,"{tu}");
Message = Message.replace(/\(sn\)/gi,"{sn}");
Message = Message.replace(/\(bah\)/gi,"{bah}");
Message = Message.replace(/\(nah\)/gi,"{nah}");
Message = Message.replace(/\(l\)/gi,"{l}");
Message = Message.replace(/\(u\)/gi,"{u}");
Message = Message.replace(/\(k\)/gi,"{k}");
Message = Message.replace(/\(f\)/gi,"{f}");
Message = Message.replace(/\(w\)/gi,"{w}");
Message = Message.replace(/\(z\)/gi,"{z}");
Message = Message.replace(/\(x\)/gi,"{x}");
Message = Message.replace(/\(\{\)\(\}\)/gi,"{{}}");
return Message;
}
}
This post was edited on 12-19-2007 at 05:03 AM by davidpolitis.
|
|
12-19-2007 05:01 AM |
|
|
aNILEator
Skinning Contest Winner
...in the wake of the aNILEator
Posts: 3718 Reputation: 90
35 / /
Joined: Oct 2003
Status: Away
|
RE: Script Work for One Account
quote: Originally posted by davidpolitis
Not everything's exactly working but I've spent enough time on it, lol.
You forgot to fix the code for and some others you added ( & )'s around it
code: function OnEvent_ChatWndSendMessage(ChatWnd, Message)
{
if (Messenger.MyEmail == "YOUR EMAIL")
{
Message = Message.replace(/:\)/gi,"=)");
Message = Message.replace(/:D/gi,"=D");
Message = Message.replace(/:O/gi,"=O");
Message = Message.replace(/:P/gi,"=P");
Message = Message.replace(/:-\#/gi,"=#");
Message = Message.replace(/\(h\)/gi,"{h}");
Message = Message.replace(/8-\|/gi,"8o)");
Message = Message.replace(/\(brb\)/gi,"{brb}");
Message = Message.replace(/\^o\)/gi,"=/");
Message = Message.replace(/:S/gi,"=S");
Message = Message.replace(/:\|/gi,"=|");
Message = Message.replace(/:\(/gi,"=(");
Message = Message.replace(/:-\*/gi,"=*");
Message = Message.replace(/:\$/gi,"=$");
Message = Message.replace(/:\@/gi,"=@");
Message = Message.replace(/\+o\(/gi,"=o(");
Message = Message.replace(/8o\|/gi,"=o|");
Message = Message.replace(/\(a\)/gi,"{a}");
Message = Message.replace(/\(6\)/gi,"{6}");
Message = Message.replace(/\(co\)/gi,"{co}");
Message = Message.replace(/\(e\)/gi,"{e}");
Message = Message.replace(/\(t\)/gi,"{t}");
Message = Message.replace(/\(i\)/gi,"{i}");
Message = Message.replace(/\(mp\)/gi,"{mp}");
Message = Message.replace(/\(p\)/gi,"{p}");
Message = Message.replace(/\(\~\)/gi,"{~}");
Message = Message.replace(/\(o\)/gi,"{o}");
Message = Message.replace(/\(um\)/gi,"{um}");
Message = Message.replace(/\(\%\)/gi,"{%}");
Message = Message.replace(/\(xx\)/gi,"{xx}");
Message = Message.replace(/\(au\)/gi,"{au}");
Message = Message.replace(/\(ap\)/gi,"{ap}");
Message = Message.replace(/\(so\)/gi,"{so}");
Message = Message.replace(/\(y\)/gi,"{y}");
Message = Message.replace(/\(n\)/gi,"{n}");
Message = Message.replace(/\(yn\)/gi,"{yn}");
Message = Message.replace(/\(h5\)/gi,"{h5}");
Message = Message.replace(/\(m\)/gi,"{m}");
Message = Message.replace(/\(ip\)/gi,"{ip}");
Message = Message.replace(/\(\#\)/gi,"{#}");
Message = Message.replace(/\(r\)/gi,"{r}");
Message = Message.replace(/\(\*\)/gi,"{*2}");
Message = Message.replace(/\(st\)/gi,"{st}");
Message = Message.replace(/\(pi\)/gi,"{pi}");
Message = Message.replace(/\(b\)/gi,"{b}");
Message = Message.replace(/\(d\)/gi,"{d}");
Message = Message.replace(/\(c\)/gi,"{c}");
Message = Message.replace(/\(\&\)/gi,"{dog}");
Message = Message.replace(/\(\@\)/gi,"{@}");
Message = Message.replace(/\(tu\)/gi,"{tu}");
Message = Message.replace(/\(sn\)/gi,"{sn}");
Message = Message.replace(/\(bah\)/gi,"{bah}");
Message = Message.replace(/\(nah\)/gi,"{nah}");
Message = Message.replace(/\(l\)/gi,"{l}");
Message = Message.replace(/\(u\)/gi,"{u}");
Message = Message.replace(/\(k\)/gi,"{k}");
Message = Message.replace(/\(f\)/gi,"{f}");
Message = Message.replace(/\(w\)/gi,"{w}");
Message = Message.replace(/\(z\)/gi,"{z}");
Message = Message.replace(/\(x\)/gi,"{x}");
Message = Message.replace(/\(\{\)\(\}\)/gi,"{{}}");
return Message;
}
}
This post was edited on 12-19-2007 at 05:33 AM by aNILEator.
|
|
12-19-2007 05:29 AM |
|
|
davidpolitis
Full Member
Posts: 371 Reputation: 16
Joined: Aug 2006
|
RE: RE: Script Work for One Account
quote: Originally posted by aNILEator
You forgot to fix the code for :S
lol, my bad. Smilies really should've been disabled in the post to begin with :/
|
|
12-19-2007 05:34 AM |
|
|
aNILEator
Skinning Contest Winner
...in the wake of the aNILEator
Posts: 3718 Reputation: 90
35 / /
Joined: Oct 2003
Status: Away
|
RE: Script Work for One Account
[noparse] Is your friend :)[/noparse]
|
|
12-19-2007 05:36 AM |
|
|
Eddie
Veteran Member
Posts: 2078 Reputation: 30
32 / /
Joined: Oct 2005
Status: Away
|
O.P. RE: Script Work for One Account
oops, sorry guys, and thanks, appreciated
...there used to be a signature here
|
|
12-19-2007 05:39 AM |
|
|
Pages: (2):
« First
[ 1 ]
2
»
Last »
|
|
|