Results 1 to 15 of 21

Threaded View

  1. #1
    winberg's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    70
    Reputation
    14
    Thanks
    14
    My Mood
    Stressed

    aIW|SendCommand from external app

    Code:
    void WriteCommandToConsole(string Command)
    {
        HWND hwnd = FindWindow(NULL,L"aIW Console");
        HWND childHwnd = FindWindowEx(hwnd,NULL,L"Edit",NULL);
        const int Lenght = Command.length();
    
        char cCommand[Lenght];
    
        for(int i = 0; i < Command.size();i++)
        {
            cCommand[i] = Command.at(i);
        }
    
        for(int i = 0,inInt; i < Command.size(); i++)
        {
            inInt = cCommand[i];
            SendMessage(childHwnd,WM_CHAR,inInt,true); 
        }
        SendMessage(childHwnd,WM_CHAR,VK_RETURN,true);
    
    }

    Usage:

    Code:
    WriteCommandToConsole("cg_drawFps 1");
    Creditz: me

    Enjoy

    I found out a good type cast so here is a improved version:

    Code:
    void SendCommand(LPCTSTR Command)
    {
        static HWND editBox = FindWindowEx(FindWindow(NULL, L"aIW Console"),0,L"Edit",0);
        if(editBox == NULL)
            return;
        else
        {
            SendMessage(editBox,WM_SETTEXT,0,(LPARAM)((LPCTSTR)Command));
            SendMessage(editBox,WM_CHAR,VK_RETURN,0);
        }
    }
    Last edited by Heartview; 08-05-2011 at 09:06 AM.

  2. The Following 4 Users Say Thank You to winberg For This Useful Post:

    ♪~ ᕕ(ᐛ)ᕗ (08-03-2011),aIW|Convery (09-05-2011),rkaf (08-30-2011),shadowx360 (08-03-2011)

Similar Threads

  1. [Release] .NET External BoxESP 1.1 [aIW|Steam]
    By master131 in forum Call of Duty 6 - Modern Warfare 2 (MW2) Hacks
    Replies: 211
    Last Post: 11-06-2011, 10:05 PM
  2. [Solved] Banned From AIW, waited 3 days, still banned??!
    By xZaapz in forum Call of Duty Modern Warfare 2 Help
    Replies: 30
    Last Post: 08-10-2011, 12:19 AM
  3. [Release] WildCatzNet: Official Beta Release! (Banned From aIW? Play Here!)
    By NutriGrain in forum Call of Duty Modern Warfare 2 Private Servers
    Replies: 88
    Last Post: 12-30-2010, 11:44 PM
  4. [Release] aIW External Hacks Patch v2 [1.3.37a]
    By House in forum Call of Duty Modern Warfare 2 Private Servers
    Replies: 173
    Last Post: 12-04-2010, 11:52 AM
  5. [TUT]How to unbanned from aIW
    By Beremix in forum Call of Duty Modern Warfare 2 Tutorials
    Replies: 12
    Last Post: 12-01-2010, 02:35 AM