Run("notepad.exe") WinWaitActive("Untitled - Notepad") Send("This is some text.") WinClose("Untitled - Notepad") WinWaitActive("Notepad", "Do you want to save") Send("!n")