Questions tagged [sendinput]

Synthesizes keystrokes, mouse motions, and button clicks.

251 questions
0
votes
1 answer

How to handle double click exactly?

I want to handle action double click by clicking left_mouse 2 times.Between 2 click-time,I sleep 100ms SendInput(LEFT_CLICK...); Sleep(100); SendInput(LEFT_CLICK...); It works OK in my PC,but not works correctly in virtual machine May be,There is…
quanrock
  • 89
  • 2
  • 10
0
votes
1 answer

Can't send Browser_Back/Forward via SendInput() (only on Surface Pro 2)

some days ago, I got my Microsoft Arc Touch Mouse Surface Edition. Unfortunately, it doesn't have Forward/Back-Buttons (it performs only Page-Up/Page-Down). So, I've written a little program, that catches the press of the Page_Up/Page_Down Keys and…
Rul3r
  • 526
  • 6
  • 14
0
votes
2 answers

c# moving mouse not working without focus

I want to move the mouse and simulate mouse clicks outside of my application. I've tried every possible way of moving the mouse, sendinput, tons of libraries including BotSuite and Input Simulator. Every time my application loses focus it's not…
Farami
  • 1
  • 2
0
votes
1 answer

C++ SendInput not letting go off the key

I use these codes below, they keep holding both the left and right keys and never let go off them until I press those keys myself. I could run the left key code and keep pressing the right key.. and it will keep pressing the left key.. only until I…
SSpoke
  • 5,656
  • 10
  • 72
  • 124
0
votes
2 answers

Emulating alt-tab keys causes the menu to get stuck on screen

I need to make a custom hotkey for the alt-tab function. I'm doing this with SendInput by sending the corresponding keys, and it works fine. However, if a hotkey already includes the alt key, the program only needs to press and release tab; but…
riv
  • 6,846
  • 2
  • 34
  • 63
0
votes
1 answer

how do I use sendinput on an mdi child window in external application?

I am trying to use the sendinput API on an mdi child window in an external application to send keys/mouse input to it for mathematical operations. I have the window handle id and use setfocus windows API to setfocus on it but sendinput will not send…
starman
  • 1
  • 4
0
votes
1 answer

SendInput() PInvoke doesn't work, i don't know why

For some reason SendInput() Pinvoke don't work. SendInput() always give 0 back, i tried to run it as Administrator, still no changes. it works perfectly in c++. i've been looking for hours, please help me. I'm running a Windows 8 64x bit computer.…
alcedo707
  • 11
  • 1
  • 5
0
votes
2 answers

C# p/Invoke How to simulate a keyPRESS event using SendInput for DirectX games

I've often struggled with simulating keyboard press events for various bots, or other GUI automating programs. I've managed to simulate keydown events using: INPUT[] kInput = new INPUT[1]; kInput[j].type =…
Slushba132
  • 423
  • 2
  • 5
  • 20
0
votes
1 answer

SendInput not working after attaching thread input to a target process

I'm making an application that needs to work with the UI of a program which doesn't seem to implement UI Automation elements (Inspect.Exe only shows the main pane and no children). So I researched about what the best ways to implement the features I…
KappaG3
  • 660
  • 5
  • 14
0
votes
1 answer

Modifier keys works strange with SendInput()

I am trying to implement a SendKeys() function with SendInput(), and here is my key snippet of my function: void static SendKeys(string s){ int modifier=0x00; string s1=s.substr(0, 1); int key=0x00; if (s1=="+"){ s.erase(0, 1); …
Elderry
  • 1,902
  • 5
  • 31
  • 45
0
votes
2 answers

What is the proper way to fill a HARDWAREINPUT struct for use with SendInput?

I'm trying to send a WM_KEYDOWN/WM_KEYUP pair to an application which normally does NOT respond to the use of the KEYBDINPUT struct. I will need to send the escape key, as well as alphanumeric characters. As the MSDN only gives vague information on…
RectangleEquals
  • 1,825
  • 2
  • 25
  • 44
0
votes
1 answer

Remapping keys on Direct3D game

I'm trying to remap some keys for a game (Elsword). First of all I use this code to simulate the pressed key: #define WINVER 0x0500 #include #include #include #include "dinput.h" int main() { HWND hWndMain =…
xXDraklordXx
  • 45
  • 1
  • 7
0
votes
1 answer

how to properly simulate keyboard events once a hotkey combination is activated

I have a program that registers a certain hotkey combination for activation. For the purpose of this question, let's say this hotkey is Ctrl + Alt + D. Once the combination is pressed, my program will then simulate some other keyboard events to the…
user1715925
  • 607
  • 9
  • 26
0
votes
1 answer

How to write strings to other application?

How to use the windows API to communicate with other applications? For example, another application has a textbox, I have already set mouse on there using mouse_event, but I don't know how to send a string to it, and display the string on that…
0
votes
1 answer

KeyEventArgs to VirtualKeyCode

I'm trying to make use of the WindowsInputSimulator library to help me simulate keyPresses. The software will consist of a client and a server. When a key is entered on the Client, it's KeyEventArgs are sent to the Server. The server then does the…
DTI-Matt
  • 2,065
  • 9
  • 35
  • 60
1 2 3
16
17