I would like to open Notepad++ and let it display some unsaved text programmatically from my application. My first approach was to save a text file and then let notepad++ open it.
Process.Start("notepad++.exe", filename);
But I don't wanna spam the file system with random files. And when the user edits the opened text file and saves it, I don't wanna go and try to remove unedited files that my app created. I thought "open notepad++, throw the text inside, and be done with it" would be the cleanest way to do it. FYI: The text is not supposed to come back. It's a one-way-transaction.
I could open notepad++ and send some keystrokes to the system (e.g. text to the clipboard, Ctrl+V in notepad++). But that is unclean and relies on well handled window focusing. Is there another way to make notepad++ display text that has no file or filename?
I tried to find something in notepad++ comand line options. And ghost typing doesn't work for me at all.
Edit: I don't want to do ANY text editing in my app. So it's just about sending text to notepad++.