Eryan.Input.KeyBoard.sendChar C# (CSharp) Method

sendChar() public method

Sends the given keypress to the EVE client
public sendChar ( char c ) : void
c char
return void
        public void sendChar(char c)
        {
            if (appWin != IntPtr.Zero)
            {
                if ((int)c < 91 && (int)c > 64)
                {
                    //PostMessage(appWin, WM_KEYDOWN, (long)VKeys.VK_SHIFT, 0x00140001);
                    keybd_event((byte)VKeys.VK_SHIFT, 0, 0, 0);
                    Thread.Sleep(550);
                    PostMessage(appWin, WM_KEYDOWN, (IntPtr)VkKeyScan(c), (IntPtr)keytranslator[c.ToString().ToLower()[0]]);
                    Thread.Sleep(550);
                    keybd_event((byte)VKeys.VK_SHIFT, 0, 0x2, 0);
                    //PostMessage(appWin, WM_KEYUP, (long)VKeys.VK_SHIFT, 0x00140001);
                }
                else
                    PostMessage(appWin, WM_KEYDOWN, (IntPtr)VkKeyScan(c), (IntPtr)keytranslator[c]);
                System.Threading.Thread.Sleep(60);
            }
        }

Usage Example

Ejemplo n.º 1
0
            base.OnMouseMove(e);
        }


        protected override CreateParams CreateParams
        {
            get
            {
                // Set the WS_EX_TRANSPARENT flag without enabling click-through