|
-
Jun 2nd, 2016, 02:45 PM
#1
Thread Starter
New Member
How to simulate a key pressing in VB
Hi, I've got a problem witch often annoys me, that's how to simulate a key pressing.
I actually know how to make the computer type character, but I'd like to press other keys like Left, Right, Ctrl... and I'd also like to keep the keys down as long as I want.
Thanks for your answers !
-
Jun 2nd, 2016, 03:12 PM
#2
Lively Member
Re: How to simulate a key pressing in VB
You are probably going to have to provide more info about your problem. What have you tried to get this to work? Do you have an example of what exactly you are trying to do in code?
-
Jun 2nd, 2016, 04:16 PM
#3
Thread Starter
New Member
Re: How to simulate a key pressing in VB
I can't really give an example, because I'm just looking for a command or a function.
It can be for example : Keyboard.PressKey(Keys.Left, 1500). 1500 would be the time to keep the key down.
-
Jun 2nd, 2016, 04:20 PM
#4
Lively Member
Re: How to simulate a key pressing in VB
Why not just run a while loop on the forms key down or key press event?
-
Jun 2nd, 2016, 04:23 PM
#5
Re: How to simulate a key pressing in VB
What mechanism are you using to 'type a character'? Why can't you do the same for other keys?
Simply, as stated before, you need to give more information. Is this your application? Are you wanting to interact with another application? Do you want to send data to another application? Ids this a game cheater that you are trying to implement?
"Ok, my response to that is pending a Google search" - Bucky Katt.
"There are two types of people in the world: Those who can extrapolate from incomplete data sets." - Unk.
"Before you can 'think outside the box' you need to understand where the box is."
-
Jun 2nd, 2016, 05:01 PM
#6
Thread Starter
New Member
Re: How to simulate a key pressing in VB
To type characters, it's quiet simple:
Sendkeys.Send("a"), but you cant write Left instead of "a", and you cant make it keep the key down few seconds.
I dont know what informations I could give.
Yes, I want to interact with a game to cheat.
-
Jun 2nd, 2016, 05:03 PM
#7
Thread Starter
New Member
Re: How to simulate a key pressing in VB
 Originally Posted by Recoil1980
Why not just run a while loop on the forms key down or key press event?
I dont see want you mean.
-
Jun 2nd, 2016, 05:16 PM
#8
Lively Member
Re: How to simulate a key pressing in VB
 Originally Posted by Nayl.VBcoder
Yes, I want to interact with a game to cheat.
I am unable to help further...
-
Jun 2nd, 2016, 11:50 PM
#9
Hyperactive Member
Re: How to simulate a key pressing in VB
Never mind, I just saw this was for cheating.
-
Jun 3rd, 2016, 04:13 AM
#10
Thread Starter
New Member
Re: How to simulate a key pressing in VB
So, does anyone know if such a command or fonction exists ?
-
Jun 3rd, 2016, 04:14 AM
#11
Thread Starter
New Member
Re: How to simulate a key pressing in VB
If you want to know, it's to cheat on the hidden game in Google Chrome.
-
Jun 3rd, 2016, 04:48 AM
#12
Re: How to simulate a key pressing in VB
We do not condone cheating on this forum. Apart from anything, reverse engineering Google's content breaks their terms and conditions.
Thread Closed
The best argument against democracy is a five minute conversation with the average voter - Winston Churchill
Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|