MATLAB: Open new notepad and insert some text without saving it in file

guinotepad

I know that I can launch notepad from command:
!notepad
and I know that possible to open some existent text file by next way:
!notepad PathFile.extencion
But I want just to open notepad and automaticaly put in this window some text. And do it operation every time when push the button in my gui. Then operate with some number of opened unnamed notepad windows, copying and replacing text from one window to another, and then close it without saving. Please help me find the solve if it possible! Thanx!

Best Answer

You want to remote control Notepad from Matlab, move some strings from one instance to the other and finally close the instances without saving? Why???
This is a really complicated project. Matlab is not designed to control other programs remotely and I cannot imagine that this method is useful at all. It will have a horrible usability.
Notepad has very limited power. Why don't you open the strings in Matlab figures containing an uicontrol('edit')? This allows copy&paste also, but no remote controlled magic.