You can use the function FindWindowEx to find the window of a Notepad, then use FindSubWindow to find the Edit control of the Notepad, and then use Win_GetText to get the text of the Notepad. Win_GetText can get the text of an Edit which in another process.