SendKeys Help
Hello Fellow Coders,
I have a very simple question. This is extremely simple, and I haven't been able to figure it out. It makes me feel like an idiot. How do I make a button send using the enter key, or for a web browser, make the textbox send using enter instead of only the button? Help would be greatly appreciated.
Thanks,
PJ
in timer1 add this code.
as for the webbrowser im not sure!!
[php]
sendkeys.send(textbox1.text)
sendkeys.send("{Enter}")
[/php]
if the above code dont work. post you full code here.. in php script style by going
[ php ] code here [/ ph p ]
Without space's
On the button's click event add the following code:
Sendkeys.Send(Textbox1.Text)
Sendkeys.Send("{Enter}")
This will send the keys to the active application.
Note: To activate an application, use the following function before the two lines shown above:
AppActivate ("Application Title")
'Replace "Application Title" with the title of the application you're spamming in. For example: You can use "Mozilla FireFox", if you want to spam in the Webbrowser.
So the final code will be:
AppActivate ("Application Title")
Sendkeys.Send(Textbox1.Text)
Sendkeys.Send("{Enter}")
To auto-send add the same code in a timer.
Hope this helps.