Closing Notepad
So we've printed the document. Now all we need to do is close Notepad. How do we close Notepad with keystrokes? There are a number of ways. Notice that under the File menu is the usual Exit option. If we use ALT-F to open the file menu the Exit option has 'x' underlined, so ALT-FX will close Notepad.
In Windows ALT-F4 will also close a window. Macro Scheduler also offers a CloseWindow command, which will probably do the job (though this doesn't necessarily close all applications as not all programs process "close window" messages in the same way).
Let's use ALT-FX to simulate true user input:
SetFocus>Notepad*
Press ALT
Send>fx
Release ALT
And Notepad should disappear.