I'm developing an application in Windows Forms, with C #. For example: I want to write a text in the youtube search field, as can be seen through: link
Can someone tell me how I can send a string, sentence, to a particular position on the screen?
I can now position the cursor and click on the place where the string needs to be written. But now I lack the part of effecting the writing of it.
I've already consulted documentation about SendKeys but I do not think it's good for me ...
To move the cursor to the position I want:
//This is a replacement for Cursor.Position in WinForms
[System.Runtime.InteropServices.DllImport("user32.dll")]
static extern bool SetCursorPos(int x, int y);
SetCursorPos(10, 20);