c# - How can I send input to Visual Studio using Windows API -
I work like an extender (trying to develop user systems and hooks) The user selects some text and presses a hotkey and spreads). It should work with Visual Studio
I want to implement it using Windows API because I want to develop an app that works globally with any application (whether you are using VS or WordPad Yes, you have the same functionality).
I'm able to do this successfully with Notepad, WordPad etc. using EM_GETSEL and EM_REPLACESEL messages. But these APIs are not working with Visual Studio or MS Word.
Which API should I be able to use 1. Find out which text is selected. 2. Send input to the editor.
I am programming in C #. If you should know what I am trying to do ... I am trying to make a universal port of junk encoding which works on any editor. Therefore all help would be appreciated.
Why do not you use the system.indo.form.second user to emulate keyboard input Class for?
You can use it:
SendKeys.SendWait ("^ C"); // CTRL + C var selected text = clipboard GetText (); Var newText = Change (selected text); SendKEys.SendWait ("^ V"); // CTRL + V
Comments
Post a Comment