What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Messenger Plus! for Live Messenger » Scripting » [Request] Need pro help on this one.

[Request] Need pro help on this one.
Author: Message:
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: [Request] Need pro help on this one.
code:
/*
    This script will simulate pressing ALT+TAB when a
    specific user signs in
    (C) 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);
            }
        }
    }
}

This post was edited on 12-30-2007 at 03:48 PM by matty.
12-30-2007 03:47 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »

Messages In This Thread
[Request] Need pro help on this one. - by DennisMartijn on 12-30-2007 at 10:17 AM
RE: [Request] Need pro help on this one. - by matty on 12-30-2007 at 03:47 PM
RE: [Request] Need pro help on this one. - by DennisMartijn on 12-30-2007 at 03:49 PM


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On