Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 23:41

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Sending Mouse events to OSK (Virtual Keyboard)

Discussion on Sending Mouse events to OSK (Virtual Keyboard) within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2017
Posts: 1
Received Thanks: 0
Post Sending Mouse events to OSK (Virtual Keyboard)

Hello!

Few years ago I wrote a simple bot for a game that was using ControlSend for sending controls to the game window.

Recently I tried running it and it seems the developers of the game put some kind of protection that renders my bot useless.

I used Spy++ to see if the game received messages from the keyboard and indeed, whenever I pressed a key Spy++ would pick up a message being sent to the game window.

After messing around for weeks with c++, c# (SendMessage, PostMessage, SendInput, wrappers for input etc.) trying to send the input myself I reached to no result. Spy++ simply doesn't pick up any message I try sending to the game window myself, only those sent from the keyboard.

I decided to take another approach. I checked to see if I can use the osk (virtual keyboard) to send the controls to the game and indeed, using the mouse to click on the virtual keys works. Spy++ picks up the message and the game responds to the controls being sent.

I started writing a quick AutoIt script that will use ControlClick / MouseClick to send clicks to the osk, but it appears that the virtual keyboard is not responding to the clicks.

I'm sure that everything I mentioned was done correctly and my conclusions are justified (meaning I didn't mess up the code or something like that).

I now raise the question:

How would I go about sending clicks to the virtual keyboard in order for it to process them?

This is how I'm currently sending the clicks (either ControlClick or MouseClick):
Code:
Func SendClick($x, $y)

			$windowPosition = WinGetPos($window);
			;ControlClick($window, "", "left", 1, $x, $y);
			MouseClick("left", $windowPosition[0] + $x, $windowPosition[1] + $y, 1, 10);

EndFunc

Thank you in advance!
visiris is offline  
Reply

Tags
controlsend


Similar Threads Similar Threads
WTT: Keyboard with Cherry MX Red switches to keyboard with Cherry MX Blue switches
08/16/2014 - Trading - 2 Replies
As the title already says, i am looking to trade my Qpad MK50 keyboard with Cherry MX Red switches to some other mechanical keyboard with Blue switches. I may also give a bit of money, if your keyboard is more expensive.
[C++] Get and save whole Keyboard (Text) Input without Keyboard Hook
03/24/2012 - Coding Tutorials - 1 Replies
Credits: me (silentchris) Alright, this shit will work with ALL Keyboards :) And you wont need to use a Keyboard Hook, which is, btw., gettin detected by some Anticheats ;) // Gets the current pressed key by looping thru all fkin vKey Codes DWORD FetchKeyCode( ) { DWORD i = 0x00; DWORD ret = 0x00;
HackShield does not let me fake mouse and keyboard events.
10/27/2011 - General Coding - 0 Replies
I use SendInput to simulate a mouse down event, but Digimon Masters (a game protected by HackShield) does not respond. Same goes for mouse up and all keyboard events, but not for mouse movements -> they work. I need to find the right hole to fuck in HackShield. I know it won't believe any mouse/keyboard event that didn't came directly from a driver and a virtual driver is something I don't think I can write. Are there any other solutions? Fuck you HackShield. Thanks for reading.



All times are GMT +1. The time now is 23:41.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.