Questions tagged [sendinput]

Synthesizes keystrokes, mouse motions, and button clicks.

251 questions
0
votes
0 answers

How can I fix a keypress loop which stops when pressing another key?

I have programmed a loop which spams spacebar (low-level input) when I hold down spacebar. This does work, but it suddenly stops working when I press any other key while holding spacebar. How can I fix it? I am using InputManager API from here. …
Tibix
  • 17
  • 1
  • 4
0
votes
1 answer

Mouse simulation with SendInput

I made some application for automatic processing. It used SendInput in C# I tested that code on my PC, it's working fine. But now I installed that app on other PC, but it's not working. I attached some code snippet for understanding. public…
mark Oriend
  • 165
  • 10
0
votes
2 answers

Simulating a drag & drop operation using SendInput

Can SendInput be used to simulate a drap & drop operation? I've got an application that accepts files of a certain format that are dropped on it, but not from the command line, and I want to associate it with a file. I thought I'd create a small…
configurator
  • 40,828
  • 14
  • 81
  • 115
0
votes
0 answers

SendInput() of an input array to STEAM CLIENT

I'm trying to simulate a CTRL + V keypress (and release) by using the INPUT struct in windows.h, but I can only get it to work in simple programs such as notepad, whereas in the Steam client it doesn't actually write to it: INPUT ip[4]; …
Will123
  • 55
  • 1
  • 7
0
votes
2 answers

Passing a string into SendInput() (C++)

Due To The Inconvenience, I've moved to C# for this project, no further comments needed I've encountered an issue during the development of a C++ tidbit, which sends keystrokes based on user input. Upon trying to send the actual keystrokes, I am…
Koi
  • 87
  • 1
  • 9
0
votes
1 answer

How to Send key faster with PixelGetColor / PixelSearch

I am using this code to send pot key when I press skill key *RButton:: { PixelGetColor, ColorOutPut, 256, 762, Fast RGB ;2 last if (ColorOutPut = 0x090606) { ;~ PixelGetColor, ColorOutPut, 273, 750, Fast RGB ;charge …
Marco Polo
  • 71
  • 1
  • 5
0
votes
0 answers

AutoIt input controls ignored by game

I'm trying to send input from an AutoIt script to a game. I used Spy++ and when I press W it receives: But when I use Send("w") or any other method that simulates input (ControlSend(), MouseClick(), ControlClick()) it receives nothing. I also tried…
laurGanta
  • 175
  • 1
  • 1
  • 12
0
votes
1 answer

Is it a bug to pass a single-element array to SendInput?

Given the following code void foo() { INPUT input{}; input.type = INPUT_MOUSE; input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN; SendInput(1, &input, sizeof(input)); input.mi.dwFlags = MOUSEEVENTF_LEFTUP; SendInput(1, &input,…
IInspectable
  • 46,945
  • 8
  • 85
  • 181
0
votes
1 answer

Is my JNA SendInput() call flawed?

I've condensed my project code into the example below to show my issue. The example/snippet references concepts used here and here. The console output shows 4 events sent; so I expected the output in notepad to be "12", but I only see "1" in…
AMemberofDollars
  • 331
  • 2
  • 14
0
votes
1 answer

SendInput to Ctrl+C text Doesn't Work When Launched from Hotkey

Currently using this code to Copy selected text in currently open Window in Windows 10. This code is working fine if I run it on its own by when my target program (Notepad) has focus. The selected text in notepad is copied into data variable…
Malcolm McCaffery
  • 2,468
  • 1
  • 22
  • 43
0
votes
1 answer

Tracking mouse input events

Currently using SendInput(MOUSEEVENTF_MOVE) to simulate mouse movements. SendInput adds a new mouse event to the thread input queue before being processed. Is it possible to track/check if an specific event has actually been processed? Tracking…
0
votes
0 answers

VB2015 winform Sendinput mouseclick to Excel, not working

I have a subscription to a password protected excel workbook. The workbook has to get run each day. So I have code opens the workbook with its password and then I want to click on two buttons on a specific sheet. So I am pulling my hair out on how…
newoptionz
  • 47
  • 7
0
votes
1 answer

win32api and python causing my screen to go black when it moves the mouse

For whatever reason the screen is going black after the second or third movement of the mouse. First is the function i use to move the mouse: import ctypes import time SendInput = ctypes.windll.user32.SendInput def MoveMouse(x, y): extra =…
Daveyman123
  • 315
  • 3
  • 13
0
votes
0 answers

SendInput sends wrong Unicode character in MFC

I have a simple SendChar function: void SendChar(const char mC) { INPUT ip={0}; KEYBDINPUT kb={0}; char mK=mC; kb.wScan=mK; kb.dwFlags=KEYEVENTF_UNICODE; ip.type=INPUT_KEYBOARD; ip.ki=kb; …
HuynhAT
  • 175
  • 1
  • 8
0
votes
1 answer

SendInput won't send mouse events to on screen keyboard in Win 10

I am trying to use SendInput to convert touches from a touch sensor into standard mouse events. This works fine with several standard Windows apps. But when I send a LEFT_MOUSE_DOWN event while over the OSK, nothing happens. And yet when I click…
TonyG
  • 1
  • 2