Window Focus Locker and Macro Key Combination Sender

Started by psishock, February 23, 2010, 16:37:36

Previous topic - Next topic


So i've got fed up with softwares that use some nasty internal protections and limits you to have them on focus all the time, or else they wont work. Mostly they even they wont accept external inputs from other third party programs, only when you use your "hardware" inputs.

Now i was thinking, if i cant "crack" the protection of these programs, maybe i could fool them, so they are all the time in the focus, and will receive the commands from my hardware inputs. The trick is, that all the other programs around it will receive the "remote hack". Your hardware mouse and keyboard key functions are altered, the clicked window will never actually receive example the "left click" command when you left click on it, or keyboard inputs, but a special remote command, based on mouse hover and the actual pressed keys, so they will never be actually enabled, focused, but you can interact with them using your mouse and keyboard as you would naturally do.

It works with most of the programs, but some of them will just wont receive some of the remote commands. Example it works perfectly with notepad or firefox, but i couldnt get modplug to receive keyboard commands, while the mouse commands are working just about fine.

This is a proof of concept program, with the help of it, i can browse the net, check series and write code while having the chosen program focused all the time and making it receive macro commands that are look like a normal hardware input. It detects your mouse hover position whenever you click or type something, so you can click on your desired stuff or just start typing while having the mouse hovering on them, they will receive the keys/clicks as if they would actually focused.
In this example, it's set to "lock the focus" on the windows calculator, and send the "1" key to it all the time, but you can change the working window class or the keys also, or add more complex commands if you mess with the source code. Can receive any windows class names with some freeware window spy programs like for instance.
It has an experimental username and password typing macro, it will automatically enter it wherever you want, with a simple CTRL+L combination. It uses a typing delay randomizer code, so cannot be detected by repetition checker algorithms, it should do what a bored normal human would do too.

Go ahead, load up windows calculator and firefox example, and try to do anything with the browser, while the calculator will stay focused and receive your desired key.

You can also do whatever you want with the program, i've included the source also. Compile it with AHK2EXE.

Window Focus Locker and Macro Key Combination Sender

Have fun.
I'm as calm as a synth without a player.  (Sam_Zen)