Questions tagged [sendinput]

Synthesizes keystrokes, mouse motions, and button clicks.

251 questions
0
votes
0 answers

X11 - Xlib - C: XButtonEvent to minimized window (chromium)

is there a (Xlib, XCB)-way to simulate a mouse click in a minimized window (in this case chromium)? I am trying to automate some stuff and it works fine if the window is somewhere on the screen (see code below). However, as soon as I (sometimes…
limo123
  • 1
  • 1
0
votes
0 answers

How can a python script running as an elevated process send mouse clicks to a UAC window?

I'm writing a python script in Windows that can control the mouse by using ctypes to call the SendInput function from User32.dll. The script is run as an elevated process, and generally it can interact with all windows, including those from other…
Bri Bri
  • 2,169
  • 3
  • 19
  • 44
0
votes
1 answer

Why do some applications not accept some sendkeys at some times

This is an issue I've ran into before, but I've always given up solving the problem and worked out a work around. Not today (hopefully). I'm trying to make a bot for the classic Doom II. I want my bot to have access to the main menu which is…
FraserOfSmeg
  • 1,128
  • 2
  • 23
  • 41
0
votes
1 answer

SendInput strings?

So I've been trying to make a program that sends a string of keystrokes over to the currently open window and whenever I run the code, it doesn't send whatever I want it to send it sends something completely different(i.e sending bob comes up as 22…
PavelF
  • 321
  • 1
  • 2
  • 11
0
votes
1 answer

Sending keyboard input data over socket using C++

I am trying to make a remote keyboard application using WinSock2. I'm currently using sendInput to register a keydown event when a character comes in through the socket. This works great when writing a text documents, but not when playing video…
diederik
  • 141
  • 1
  • 3
  • 8
0
votes
1 answer

error LNK2019: unresolved external symbol when using SendInput()

I'm writing a C program that uses the SendInput() function to simulate keystrokes. However, I get the following error when compiling: error LNK2019: unresolved external symbol __imp__SendInput@12 referenced in function _main. I am using the…
Santiago Benoit
  • 994
  • 1
  • 8
  • 22
0
votes
1 answer

Sendkey or SendInput doesn't copy from input field

I have written a small Console application which Copies the highlightes text from a web application. I am trying to do it two ways 1) via simple Sendkeys SendKeys.SendWait("^C"); Application.DoEvents(); 2) via…
Rupesh
  • 545
  • 2
  • 8
  • 19
0
votes
0 answers

C/C++ SendInput extended ASCII

This Code should let press my Application the key '1' on my NumPad: ctrlV[5].type = INPUT_KEYBOARD; ctrlV[5].ki.wVk =0x61; //VK_NUMPAD1 ctrlV[6].type = INPUT_KEYBOARD; ctrlV[6].ki.wVk =0x61; //OR VK_NUMPAD1 ctrlV[6].ki.dwFlags =…
killertoge
  • 333
  • 1
  • 4
  • 13
0
votes
0 answers

keybd_event not working for some applications

The keybd_event function as well as mouse input function are not functioning for a particular application. I used the following code: keybd_event(VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY, 0); keybd_event(VK_LMENU, 0, KEYEVENTF_EXTENDEDKEY |…
Glaedr
  • 11
  • 2
0
votes
1 answer

Keyboard emulation with C#

I am developing a C# application that gives the user the possibility to set some specific keystrokes that the applications will reproduce when it will be launched in execution. As far as I was testing my application in notepads or other simple…
0
votes
0 answers

SendInput mouse event - dx and dy ignored and the real pointer position sent

I'm want to simulate a mouse click down in a certain position (not where the mouse cursor is at the current moment): INPUT Input={0}; // left down Input.type = INPUT_MOUSE; Input.mi.dwFlags = MOUSEEVENTF_VIRTUALDESK |…
Sanich
  • 1,739
  • 6
  • 25
  • 43
0
votes
1 answer

How to use dwExtraInfo with SendInput

I'm using ::SendInput to send a mouse click event: void LeftDown (LONG x_cord, LONG y_cord) { INPUT Input={0}; // left down Input.type = INPUT_MOUSE; Input.mi.dwFlags = MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN; …
Sanich
  • 1,739
  • 6
  • 25
  • 43
0
votes
1 answer

SendInput events don't get processed in specific UI area of game

I have a C# application which sends keyboard and mouse events to a game. In the game there's a small UI portion which can change based on what we want to see (like GPS map, different actions to take etc). Sometimes in this portion of the UI we have…
eemerge
  • 75
  • 2
  • 9
0
votes
2 answers

Activate windows "Alt Tab" switcher with SendInput

I need to show the windows switcher with SendInput. Another question I asked explains the reason of doing this. Shortly speaking, when I am holding Alt Tab to switch to other apps, my app may fire a key stroke using SendInput, which will interrupt…
Joey.Z
  • 4,492
  • 4
  • 38
  • 63
0
votes
0 answers

First Character of SendInput blocked in application

So I have an application that works with a game. At one stage in the program, it clicks on a text field, enters some text then clicks some other stuff. Now the issue is this, sometimes the first character typed is blocked. That is, if I am typing…
Mo Beigi
  • 1,614
  • 4
  • 29
  • 50