I just took a look at the AR code to see what I was using instead of WinClose and/or SendInput and have translated the calls into AHK code:
; Press ESC.
PostMessage, 0x0100, 0x1b ; 0x0100=WM_KEYDOWN, 0x1b=VK_ESC
PostMessage, 0x0101, 0x1b ; 0x0101=WM_KEYUP, 0x1b=VK_ESC
; Press ENTER.
PostMessage, 0x0100, 0x0d ; 0x0100=WM_KEYDOWN, 0x1b=VK_RETURN
PostMessage, 0x0101, 0x0d ; 0x0100=WM_KEYUP, 0x1b=VK_RETURN
Using these I've never yet seen it not close/auto-confirm a window, but using WinClose it seems to regularly mess up for me and failed to close the windows.
These calls should also work to help SafeMine and my Pacific anti-spam scripts too.
If you need to send any other keys via post message, then
this page should be helpful.
Juk [img]/images/graemlins/smile.gif[/img]