• Welcome to Valhalla Legends Archive.
 

simulateing key pressing

Started by Tontow, April 08, 2005, 05:52 PM

Previous topic - Next topic

Tontow

How do you simulate a key press? (ie: left and right arrow keys)

Blaze

The SendKeys Function might be what you are looking for.
Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

effect

You might have to select the window u want to send them to aswell?
Quote from: Mangix on March 22, 2005, 03:03 AM
i am an expert Stealthbot VBScript. Recognize Bitch.

Stealth

If they're inside your own program, just call the _KeyPress or _KeyDown event for the object you want the keys to be pressed on. You may need to experiment (ie Debug.Print KeyAscii) to figure out what the arguments should be.
- Stealth
Author of StealthBot

Yegg

Quote from: effect on April 09, 2005, 01:15 AM
You might have to select the window u want to send them to aswell?
The SendKeys function will work like a macro, it just sends keys to the computer as if you were typing them in through your keyboard. What window is being focused on will be the one that receives the keys.

Adron

If you want to send keys to non-active windows, you can sometimes use SendMessage or PostMessage with WM_KEYDOWN, WM_KEYUP and/or WM_CHAR.

Yegg

It just matters on what the purpose of his program is. Whether it be built to send key strokes to specific programs, or if it functions like a macro.

Grok

Tontow did anyone answer your question?  Some asked for more information.  How about do the community a favor and say you got your answer (maybe even which method you chose) or answer their questions so they can help you.

NetNX

Alot of programs(games) protect agienst bots and that nature by disabling the sendkeys function in their program... not sure about those other methods but maybe you could create a fake keyboard device and make a program that causes this fake device to send keys ( just a though ) i mean like not a physical device i mean like a driver that can be manipulated by a program

Yegg

Even though many games (Runescape, Eternal Lands) have protection from automated tasks by 3rd party programs, I highly doubt that they can stop the SendKeys function from your program. SendKeys sends keys directly to the computer as if you were typong them through your keyboard. Nothing can detect if you are typing or if it is a program.

NetNX

Quote from: Yegg on April 20, 2005, 01:37 PM
Even though many games (Runescape, Eternal Lands) have protection from automated tasks by 3rd party programs, I highly doubt that they can stop the SendKeys function from your program. SendKeys sends keys directly to the computer as if you were typong them through your keyboard. Nothing can detect if you are typing or if it is a program.

You oviously dont know what your talking about then... We will use something i recently worked on as an example Guildwars you can download the client from their site http://guildwars.com make a code that will log you in completely and prove me wrong using only the sendkeys api

Yegg

Why would I want to waste my time proving you wrong? I'm working on other projects.

Adron

Quote from: Yegg on April 21, 2005, 10:26 AM
Why would I want to waste my time proving you wrong? I'm working on other projects.

Maybe you are wrong. Maybe you're ignorant. Maybe you lose?

Yegg


Warrior

Since you're not going to take your time I guesss you will never know and will be assume wrong :p
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?