I'm making a script
but the var's don't save, If I relog and return my vars desapear...
how to make vars don't reset?
I'm trying...
my code:
code:
var score=0
function scorewrite(score){
var Shell = new ActiveXObject("WScript.Shell");
var ValRegPath = MsgPlus.ScriptRegPath + score;
Shell.RegWrite(ValRegPath, 0);
}
function scoreread(Score){
var score = Shell.RegRead(ValRegPath);
var score = Shell.RegRead(MsgPlus.ScriptRegPath + score);
}
function OnEvent_ChatWndReceiveMessage(ChatWnd, Origin, rMessage, MsgKind){
if (rMessage=='+1'){score+=1; scorewrite(score);}
}
function OnEvent_Timer(Timer){
if (Timer=='rato'){
Messenger.MyPersonalMessage=score
MsgPlus.AddTimer('rato',1000)
}
}
function OnEvent_Initialize(MessengerStart){
MsgPlus.AddTimer('rato',1000)
score = scoreread(score);
}
function OnEvent_SignIn(){score=scoreread(score);}
function OnEvent_Uninitialize(MessengerExit){scorewrite(score);}
with my code
when you say +1
add +1 to score and show on the psm
if I leave from the Messenger and return
when I say +1 nothing happend...
I really want save var's to close msn and don't lose the values
Sorry my bad inglish...
Thanks!