Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C# Hotkeys
Goto page Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
ZenX
Grandmaster Cheater Supreme
Reputation: 1

Joined: 26 May 2007
Posts: 1021
Location: ">>Pointer<<" : Address 00400560 Offset :1FE

PostPosted: Mon Sep 03, 2007 8:09 am    Post subject: Reply with quote

Lol, i just browse around.
I havent posted Razz.
Undead i saw all of your posts:)
Leetness


QUESTION:
If i hooked the Mouse to the program, and MAde it auto click, you think it would trick Maplestory (GMS) into thinking the mouse was clicking, therefor a working auto clicker?

_________________
CEF Moderator since 2007 ^_^
ZenX-Engine


Last edited by ZenX on Mon Sep 03, 2007 8:30 am; edited 1 time in total
Back to top
View user's profile Send private message Yahoo Messenger
the_undead
Expert Cheater
Reputation: 1

Joined: 12 Nov 2006
Posts: 235
Location: Johannesburg, South Africa

PostPosted: Mon Sep 03, 2007 8:28 am    Post subject: Reply with quote

Nope. It wouldnt.

If youre using C# the only available option is really using SendInput or SendMessage.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ZenX
Grandmaster Cheater Supreme
Reputation: 1

Joined: 26 May 2007
Posts: 1021
Location: ">>Pointer<<" : Address 00400560 Offset :1FE

PostPosted: Mon Sep 03, 2007 8:31 am    Post subject: Reply with quote

the_undead wrote:
Nope. It wouldnt.

If youre using C# the only available option is really using SendInput or SendMessage.


I see.
Hmmm, There are many many limitations for C#.

Offtopic:
Can you read my ug app for Darkrising?


[On topic]
Code:

class Test
{
    public enum VK : ushort
    {
    SHIFT        = 0x10,
    CONTROL          = 0x11,
    MENU         = 0x12,
    ESCAPE           = 0x1B,
    BACK         = 0x08,
    TAB          = 0x09,
    RETURN           = 0x0D,
    PRIOR        = 0x21,
    NEXT         = 0x22,
    END          = 0x23,
    HOME         = 0x24,
    LEFT         = 0x25,
    UP           = 0x26,
    RIGHT        = 0x27,
    DOWN         = 0x28,
    SELECT           = 0x29,
    PRINT        = 0x2A,
    EXECUTE          = 0x2B,
    SNAPSHOT         = 0x2C,
    INSERT           = 0x2D,
    DELETE           = 0x2E,
    HELP         = 0x2F,
    NUMPAD0          = 0x60,
    NUMPAD1          = 0x61,
    NUMPAD2          = 0x62,
    NUMPAD3          = 0x63,
    NUMPAD4          = 0x64,
    NUMPAD5          = 0x65,
    NUMPAD6          = 0x66,
    NUMPAD7          = 0x67,
    NUMPAD8          = 0x68,
    NUMPAD9          = 0x69,
    MULTIPLY         = 0x6A,
    ADD          = 0x6B,
    SEPARATOR        = 0x6C,
    SUBTRACT         = 0x6D,
    DECIMAL          = 0x6E,
    DIVIDE           = 0x6F,
    F1           = 0x70,
    F2           = 0x71,
    F3           = 0x72,
    F4           = 0x73,
    F5           = 0x74,
    F6           = 0x75,
    F7           = 0x76,
    F8           = 0x77,
    F9           = 0x78,
    F10          = 0x79,
    F11          = 0x7A,
    F12          = 0x7B,
    OEM_1        = 0xBA,   // ',:' for US
    OEM_PLUS         = 0xBB,   // '+' any country
    OEM_COMMA        = 0xBC,   // ',' any country
    OEM_MINUS        = 0xBD,   // '-' any country
    OEM_PERIOD       = 0xBE,   // '.' any country
    OEM_2        = 0xBF,   // '/?' for US
    OEM_3        = 0xC0,   // '`~' for US
    MEDIA_NEXT_TRACK     = 0xB0,
    MEDIA_PREV_TRACK     = 0xB1,
    MEDIA_STOP           = 0xB2,
    MEDIA_PLAY_PAUSE     = 0xB3,
    LWIN       =0x5B,
    RWIN       =0x5C
    }

    public struct KEYBDINPUT
    {
    public ushort wVk;
    public ushort wScan;
    public uint dwFlags;
    public long time;
    public uint dwExtraInfo;
    };
    [StructLayout(LayoutKind.Explicit,Size=28)]
    public struct INPUT
    {
    public uint type;
    public KEYBDINPUT ki;
    };

    void Test()
    {
    INPUT[] structInput = new INPUT[1];
    structInput[0].type = Win32Consts.INPUT_KEYBOARD;

    // Key down shift, ctrl, and/or alt
    structInput[0].ki.wScan = 0;
    structInput[0].ki.time = 0;
    structInput[0].ki.dwFlags = 0;
    structInput[0].ki.dwExtraInfo = Win32.GetMessageExtraInfo();
    if (Shift)
    {
        structInput[0].ki.wVk = (ushort)VK.SHIFT;
        intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    }
    if (Ctrl)
    {
        structInput[0].ki.wVk = (ushort)VK.CONTROL;
        intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    }
    if (Alt)
    {
        structInput[0].ki.wVk = (ushort)VK.MENU;
        intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    }
    if (Win)
    {
        structInput[0].ki.wVk = (ushort)VK.LWIN;
        intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    }
    // Key down the actual key-code
    structInput[0].ki.wVk = vk;
    intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    // Key up the actual key-code
    structInput[0].ki.dwFlags = Win32Consts.KEYEVENTF_KEYUP;
    intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    // Key up shift, ctrl, and/or alt
    if (Shift)
    {
        structInput[0].ki.wVk = (ushort)VK.SHIFT;
        intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    }
    if (Ctrl)
    {
        structInput[0].ki.wVk = (ushort)VK.CONTROL;
        intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    }
    if (Alt)
    {
        structInput[0].ki.wVk = (ushort)VK.MENU;
        intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    }
    if (Win)
    {
        structInput[0].ki.wVk = (ushort)VK.LWIN;
        intReturn = Win32.SendInput((uint)structInput.Length, structInput, Marshal.SizeOf(structInput[0]));
    }
    }
}

_________________
CEF Moderator since 2007 ^_^
ZenX-Engine
Back to top
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites