Advertisement

Repetedly pressing buttons...

Started by July 29, 2000 05:34 PM
11 comments, last by Chazz 24 years, 4 months ago
Ok, I am writing this program that acts on my game externally (for security testing reasons).. I need this hacking program to make my computer think I am pressing a button on the keyboard (the button is home)... This program doesnt'' make itself think that home is being pressed but the whole computer so other programs see it too. Any help would be appreciated.. BTW: Mouse buttons instead are acceptable...
-Chazz
Just a theory: Can''t you send a message to Windows? (SendMessage(NULL,...)

"Everything is relative." -- Even in the world of computers.
everything is relative. -- even in the world of computers... so PUSH BEYOND THE LIMITS OF SANITY!
Advertisement
Oh, a game, really? Or maybe you want a way to stay connected to the
Internet so your ISP won''t kick you off? Like an ISP that pays you
to surf? Hmmmmm?
well if thats the case they already have made a ton of those. sending a message like ionut said is the way to go. here is the function prototype:

    SendMessage(hwndParent, message, wParam, lParam);    

I wish there was a button on my monitor to turn up the intellegince. Theres a button called 'brightness' but it doesn't work
You could just feed scan codes to the keyboard. I''m not sure how to do this but I do know that it can be done.

------------------------------

"My sword is like a menacing cloud, but instead of rain, blood will pour in its path." - Sehabeddin, Turkish Military Commander 1438.
------------------------------"My sword is like a menacing cloud, but instead of rain, blood will pour in its path." - Sehabeddin, Turkish Military Commander 1438.
If you''re using DirectInput in the game (or any other running program) then they won''t think the key is being pressed. I think the only way to do that would be to somehow interfere with the low level keyboard handlers, and send a fake scan code (the DIK constants are scan codes). I have no clue how this would be done however, maybe there are interrupts to do it?
Advertisement
It isn''t necessarily sending scan codes to the keyboard, but storing them in the keyboard buffer. I havent used interrupts in ages, but you just need to find where the keyboard buffer is kept, and add the scan code to it.

Unfortunately, my DOS book refuses to tell me how


-Chris Bennett ("Insanity" of Dwarfsoft)

Check our site:
http://www.crosswinds.net/~dwarfsoft/
Check out our NPC AI Mailing List :
http://www.egroups.com/group/NPCAI/
made due to popular demand here at GDNet :)
Thanx alot guys... Now to encode my message! hehe

And no, I am not scamming those stupid surf for money programs, they suck anyway.. I have a job.
-Chazz
And btw: I am not on an ISP that kicks me off, because I am on DSL over a LAN..
-Chazz
Hmnn, it just crashes....


I tried this in my LRESULT CALLBACK function:


SendMessage(hwnd, WM_KEYDOWN, ''p'', NULL);


so that it would believe I was pressing p... But as the program starts, it crashes.. Any suggestions?
-Chazz

This topic is closed to new replies.

Advertisement