Write a value at a certain position on the screen, outside the form [closed]

0

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);
    
asked by anonymous 20.09.2016 / 01:14

1 answer

1

For those who need to find a project, in C # that does precisely this, just have the cursor on the site to write: link

Usage example:

InputSimulator i=new InputSimulator();
i.Keyboard.TextEntry("Ola mundo");
    
20.09.2016 / 02:12