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

.NET 

Send text to application

I havent coded vb.net in a long time, I have a quick question, I'm trying to send text from my clipboard straight to a textbox on a webpage that's already clicked on, basically I just need it to output the text and nothing else... could someone help me out on this please lol. Thanks
Is it an external web browser e.g. chrome and not the visual studio IE ?


If it's not try
Code
WebBrowser1.Document.GetElementById(TextboxID).SetAttribute("value", My.Computer.Clipboard.GetText)
You could also use SendKeys like this

PHP Code

<?php 
SendKeys
.Send(My.Computer.Clipboard.GetText) 

( The textbox has to have focus though )
(Feb 2, 2016 12:50 AM)AnonCensored Wrote:  You could also use SendKeys like this

PHP Code

<?php 
SendKeys
.Send(My.Computer.Clipboard.GetText) 

( The textbox has to have focus though )

Why do you keep offering the SendKeys function to people? It is one of the worst alternatives to use.
(Feb 2, 2016 09:17 AM)Ninja Wrote:  Why do you keep offering the SendKeys function to people? It is one of the worst alternatives to use.

Well it seemed appropriate for what he wanted to do, besides i dont really see whats so bad about it, He could use SendMessage/Postmessage etc but it's easier this way
(Feb 2, 2016 09:18 AM)AnonCensored Wrote:  Well it seemed appropriate for what he wanted to do, besides i dont really see whats so bad about it, He could use SendMessage/Postmessage etc but it's easier this way

The application must have focus all the time. Sendkeys literally emulates keystrokes on your keyboard. You would have to have the application focussed at all times and have the textbox in the browser focussed all the time. You cant use your PC while the app is running basically.
(Feb 2, 2016 09:22 AM)Ninja Wrote:  The application must have focus all the time. Sendkeys literally emulates keystrokes on your keyboard. You would have to have the application focussed at all times and have the textbox in the browser focussed all the time. You cant use your PC while the app is running basically.

But he did state It's already focused so it's not a problem
(Feb 2, 2016 09:35 AM)AnonCensored Wrote:  But he did state It's already focused so it's not a problem

It can still be focussed in the webbrowser object while the application is minimized or not focussed. Just click on a textbox here on HF and then minimize your browser.
(Feb 2, 2016 09:36 AM)Ninja Wrote:  It can still be focussed in the webbrowser object while the application is minimized or not focussed. Just click on a textbox here on HF and then minimize your browser.

I'm pretty sure he's not going to be minimizing his browser while doing this lol
(Feb 2, 2016 09:41 AM)AnonCensored Wrote:  I'm pretty sure he's not going to be minimizing his browser while doing this lol

Oh I assumed he was using a webbrowser object. My bad.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by TennoFeb 3, 2019 04:49 AM 4 307 Feb 3, 2019 04:49 AM
Last Post: Tenno
[C#] by SIM-964740Nov 27, 2016 07:01 AM 1 208 Nov 27, 2016 07:01 AM
Last Post: GuRuHaX
[.NET] by ๖ۣۜDødøskyJan 14, 2016 02:53 PM 5 182 Jan 14, 2016 02:53 PM
Last Post: ๖ۣۜDødøsky