473,386 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how simulate keyboard and mouse whilst in game?

hi i am trying to make a program that whilst ingame (magicka if anyone is interested) reads what is pressed on the keyboard and the simulates a combination of keyboard key down and keyboar key up and mouse press.

eg if i press NumPad0 it would simulate Key Press A, Key Press S, Key Press F

or if i press NumPad1 it would simulate Shift Down, LButton Press, Shift Up

i have already managed to read what is pressed on the keyboard and know just need to know how to simulate pressing my combination

i have read about DirectX's SendInput and other stuff but was wondering what is the best way to do this so the game will read what inputs i have pressed? and also if anyone has any good tutorials/help sites they can link me to!

Thanks in advance =)
Ollie
May 2 '11 #1

✓ answered by GaryTexmo

Sounds like hacks to me... :P

But give this a try...
http://www.codeproject.com/KB/cs/globalhook.aspx

It uses window messages, so it might not make it to a game, but it's a starting point. I'd be careful though, Valve Anti Cheat looks for hook programs so it might well detect you as a cheater and ban you from Steam.

6 5773
GaryTexmo
1,501 Expert 1GB
Sounds like hacks to me... :P

But give this a try...
http://www.codeproject.com/KB/cs/globalhook.aspx

It uses window messages, so it might not make it to a game, but it's a starting point. I'd be careful though, Valve Anti Cheat looks for hook programs so it might well detect you as a cheater and ban you from Steam.
May 2 '11 #2
okay just to let you know im not using it to cheat. it wont harm other peeps. it just making a hotkey type program so i can cast spells quicker, no different to programmable keys on special Razor and Logitech keyboards.

thanks for your reply i will look at it know!! =)
May 2 '11 #3
GaryTexmo
1,501 Expert 1GB
I'm just buggin' ya. I've played it so I'm pretty sure I know exactly what you're getting at. I am serious about the VAC detection though. While you may not be intending to cheat, VAC might still detect the hook as a cheat.

I'd be careful with this.
May 3 '11 #4
Okay thanks! If i go offline whilst playing will the vac still detect the hooks?!
Or is there any way you know off getting around this?! This seems tobe getting more and more about cheating now!! Lol
May 3 '11 #5
GaryTexmo
1,501 Expert 1GB
I'm honestly not sure... the trouble is, if you get busted "cheating" it locks down your whole steam account. And it's not so much that you're cheating, it's that VAC thinks you are. It tries to detect when other programs are hooking into it. I think what I linked you is ok 'cause it's just listening to windows messages, but I wanted to warn you just in case.
May 4 '11 #6
Okay thanks for the heads up! I think i shuddering be okay, as u say important not hooking into the act program! Also don't some keyboards by razor and logitech etc have programmable keys but i suppose the driver just does what it normally does for any other key!
May 4 '11 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Keeper | last post by:
Hi all, I'm trying to send chars to the current console (currently having cursor focus) - /dev/tty0 - in my program by: my $st = 'K' my $ri = 'L' my $ng = 'J' open(TTY, ">/dev/tty0");...
0
by: Peter | last post by:
Hello, Im looking for some source in c++ which allows me to block keyboard and mouse for win98 reg, Thanks
2
by: Keeper | last post by:
Hi all, I'm trying to send chars to the current console (currently having cursor focus) - /dev/tty0 - in my program by: char st='K',ri='L',ng='J'; int tty; tty = open(">/dev/tty0",...
25
by: Romanise | last post by:
An LCD monitor with keyboard and mouse capabilities on it, thinnest possible, to hang on rack-door can be a boon for expensive spaces of datawarehouses. Has anyone come across one? Maybe...
2
by: Ryan Liu | last post by:
Hi, In a windows application, What are the APIs to use to detect if the user has not using keyboard or mouse for a while(idle)? And what is the API to know the user just used either one (out of...
4
by: flplini | last post by:
I want to ask how to use C++ to simulate the mouse control? ex:Let the mouse double-click the left key functions,thanks!
5
by: nuhfeken | last post by:
We have a C# winform that uses the MVP design pattern for the user interface. For reasons I'd rather not explain we need to simulate a right mouse click on a specific control to deactivate the...
0
by: katiezhu | last post by:
I'm working a project. It's about screen control. I write the program using c/c++ in visual studio 2008. I just use my hand to replace mouse to control screen. The code is given below: //Must...
1
by: Bhanuchander | last post by:
I am develop a RemoteDiskTop Controlling Application.In that App, i done using ip address client computer keyboard ,mouse disabled(using MFC ).but i dont know to enable those things from the server.
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.