It is necessary to insert the following text into the current cursor location in the browser (to be exact, this is an indication of the login and password for the proxy during authorization).
I tried

richTextBox1.SelectedText = "1"; 

but gives an error

The name "richTextBox1" does not exist in the current context.

Is it still possible to use such a text construct to correctly insert in the required fields login{TAB}pass{TAB}{ENTER} ?


The problem is that this is not a web form and I am not a field type, this is a pop-up window for entering a login and password from a proxy in Mozilla, just need to paste the text into the current cursor position in the pop-up window

  • one
    1) If you have a field with the name richTextBox1 , and it has the type RichTextBox , and there is a link to the actual control displayed by the application, then this should insert text into it. If not, this should not be compiled. - VladD
  • 2
    2) If the focus is in the right control, the control application with the password is in the tab order for the login control, and your string is an argument to the SendKeys function, then yes, otherwise not. - VladD
  • As I understand it, you need to paste the text into the window of the browser itself, and not on the web page. In this case, look towards the hooks and WinAPI. - Alexander Petrov

0