[Request] Need pro help on this one. - 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: [Request] Need pro help on this one. (/showthread.php?tid=80541)
[Request] Need pro help on this one. by DennisMartijn on 12-30-2007 at 10:17 AM
Hello,
I'd like a script that terminates a process, when someone signs in.
When 123@hotmail.com signs in, then the process LegacyGamers.exe should be terminated. LegacyGamers.exe is a private server version of GunZ: The Duel, and has some 'anti-hack' system. It prevents you from using Alt tab, by shutting the game down if alt+tab are pressed.
Basicly, what im asking, is that when 123@hotmail.com signs in, and while im playing legacygamers (so only when the process is active), the script 'presses' alt+tab/terminates LegacyGamers.exe on its own.
Input: 123@hotmail.com signs in.
Process: If LegacyGamers.exe = active/running, Then terminate LegacyGamers.exe / "press'' Alt+tab
Output: Happy me, makes me smarter at scripting, no more problems with that contact
I hope someone can help me with this. Your help would be greatly appreciated
Thanx in advance
Edit: for those who like to hear the reason of this request;
I cant hear/see someone signing in while playing lg.exe. they talk to me, but i dont notice. i had a problem with that before, with contact 123@hotmail.com.
(note that this is just a masking adress, i can change it in the script myself
RE: [Request] Need pro help on this one. by matty on 12-30-2007 at 03:47 PM
code: /*
This script will simulate pressing ALT+TAB when a
specific user signs in
Matty 2007
*/
var kbdevent_keyup = 0x2;
var vk_alt = 0x12;
var vk_tab = 0x9;
var oWMI = GetObject('winmgmts:{impersonationLevel=impersonate}!\\\\.\\root\\cimv2');
function OnEvent_ContactSignin(sEmail) {
if (sEmail === '123@hotmail.com') {
var oProcesses = oWMI.ExecQuery('Select * From Win32_Process');
for (var oProcess = new Enumerator(oProcesses); !oProcess.atEnd(); oProcess.moveNext()) {
if (oProcess.item().Name.toLowerCase() === 'legacygamers.exe') {
Interop.Call('user32', 'keybd_event', vk_alt, 0, 0, 0);
Interop.Call('user32', 'keybd_event', vk_tab, 1, 0, 0);
Interop.Call('user32', 'keybd_event', vk_alt, 0, kbdevent_keyup, 0);
}
}
}
}
RE: [Request] Need pro help on this one. by DennisMartijn on 12-30-2007 at 03:49 PM
Wow, thats one hell of a code i wouldnt have even thought of
thank you =D
|