Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Use sendkeys.send to send string ONCE?

Is there a way to use sendkeys.send to send the string once? instead of like spamming it?
(Oct 19, 2013 06:47 PM)xXPsychophilXx Wrote:  Is there a way to use sendkeys.send to send the string once? instead of like spamming it?

Obviously don't put it in a loop. How copy pasty can someone be?
(Oct 19, 2013 06:48 PM)Feminist Wrote:  Obviously don't put it in a loop. How copy pasty can someone be?

But I have a button click event and the code is sendkeys.send(textbox1.text) this just keeps putting the text from textbox1.text over and over and over WITHOUT A LOOP
(Oct 19, 2013 06:50 PM)xXPsychophilXx Wrote:  But I have a button click event and the code is sendkeys.send(textbox1.text) this just keeps putting the text from textbox1.text over and over and over WITHOUT A LOOP

Post your code then instead of expecting us to be psychic
Ok here is my code
Code
Private Sub Button1_Click(ByVal SendWaiter As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  SendKeys.Send(Textbox1.text)
    End Sub
(Oct 19, 2013 06:54 PM)xXPsychophilXx Wrote:  Ok here is my code
Code
Private Sub Button1_Click(ByVal SendWaiter As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  SendKeys.Send(Textbox1.text)
    End Sub

is this the only code that calls the button click event? must be some other code calling this event. that code should execute once per button click.
(Oct 19, 2013 06:55 PM)lonewolf_787 Wrote:  is this the only code that calls the button click event? must be some other code calling this event. that code should execute once per button click.

Yep the only thing calling that event is the button itself
OP is stupid, quit clicking the button 300 times. Stupid!
Haha, I may know what's happening.
Somehow the textbox1.txt has an Enter ( return ) in it. It's rerunning itself since the focused object is the button.
(Oct 20, 2013 04:04 AM)Lambasoft Wrote:  Haha, I may know what's happening.
Somehow the textbox1.txt has an Enter ( return ) in it. It's rerunning itself since the focused object is the button.

Very good idea, nice one. I came to this thread thinking he didn't want to send duplicate messages from a list or some sort
I know OP is using .NET but i can also replicate his problem in VB6 too and it was the return carriage inside a textbox on the last line that causes it to spam. picture below is what happens when i put an empty line on the bottom

[Image: 6hJTdn7.png]
(Oct 20, 2013 07:38 AM)lonewolf_787 Wrote:  I know OP is using .NET but i can also replicate his problem in VB6 too and it was the return carriage inside a textbox on the last line that causes it to spam. picture below is what happens when i put an empty line on the bottom

[Image: 6hJTdn7.png]

Woah, your stars are green! (Edit: everyone's are, just noticed that lol)
Good find though. I would have never tested it haha


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by vSkyApr 6, 2022 10:17 PM 1 157 Apr 6, 2022 10:17 PM
Last Post: PixelRain
[C] by PerileosJan 15, 2021 03:25 PM 2 169 Jan 15, 2021 03:25 PM
Last Post: Perileos
[C] by MordiciaNov 15, 2019 07:21 PM 3 210 Nov 15, 2019 07:21 PM
Last Post: Mordicia