Hello,
If your machine is logged off, Windows will not allow any non-Operating system program to take the control of the mouse or keystrokes. Windows' security deals with logging into the computer at a very low level to prevent hacking.
However, once someone has logged in and then lock the computer, our advanced automation software, Automation Anywhere 4.0 can successfully unlock the computer and lock it back after executing the task. So instead of logging off the computer, you can lock the computer and our technology will unlock the machine to execute the task.
You can download free version of Automation Anywhere 4.0 from our website:
http://www.tethyssolutions.com/automation-software.htm
Moreover, upcoming version of Automation Anywhere includes feature of running task successfully when computer is logged off.
Regarding close window recording, we just tried to reproduce the scenario but it did not reproduce. Workspace Macro can very well record the action of closing window using 'Alt+F4' shortcut. We have attached a macro (testCloseWindow.wksp) for your reference. Copy it under location, 'C:\...\My Documents\Workspace Macro\My Macros' folder.
This macro will open notepad, write something in it and will close the notepad window using 'Alt+F4' keyboard shortcut.
Hope that helps!