Hi.
I'm from Denmark and my english isn't good, but I'll try.
I have made a script which makes it possible to send unlimited nudges, but when i log off and then on the script doesn't work.
Here is my script:
code:
var Kontakt = [0x5E84D9, 0x5EA515, 0x614FB6];
var Oprindelig = "\x8B\x86\xDC\x02\x00\x00";
var Fix = "\x33\xC0\x40\x90\x90\x90";
var Vaerdi = "0";
var Status = new Boolean();
function OnEvent_Initialize(bMessengerStart)
{
if(Messenger.MyStatus > "0")
{
OnEvent_Signin();
}
Patch(Vaerdi, (Status = !Status) ? Fix : Oprindelig);
var oShell = new StatusXObject("WScript.Shell");
oShell.RegWrite(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\RemoveDelay", Status & 1, "REG_DWORD");
}
function OnEvent_Signin(sEmail)
{
var hProc = Interop.Call("Kernel32", "GetCurrentProcess");
var sBuffer = Interop.Allocate(Oprindelig.length);
for (var i in Kontakt)
{
Interop.Call("Kernel32", "ReadProcessMemory", hProc, Vaerdi = Kontakt[i], sBuffer.DataPtr, Oprindelig.length, 0);
var sReturn = "";
for (var j = 0; j < sBuffer.size; j++) sReturn += String.fromCharCode(sBuffer.GetAt(j) & 0xFF);
if (sReturn === Oprindelig || sReturn === Fix)
{
try
{
var oShell = new StatusXObject("WScript.Shell");
Status = Boolean(oShell.RegRead(MsgPlus.ScriptRegPath + Messenger.MyUserId + "\\RemoveDelay"));
}
catch(exception)
{
Status = false;
}
Patch(Vaerdi, Status ? Fix : Oprindelig);
return;
}
}
Vaerdi = "0";
}
function Patch(nVaerdi, sByteString)
{
var sBuffer = Interop.Allocate(++sByteString.length);
for (j=0;j<sByteString.length;j++)
{
sBuffer.WriteWORD(j, sByteString.charCodeAt(j));
}
var hProc = Interop.Call("Kernel32", "GetCurrentProcess");
Interop.Call("Kernel32", "WriteProcessMemory", hProc, nVaerdi, sBuffer.DataPtr, sByteString.length, 0);
}
Thanks in advance.