Created
March 22, 2016 05:53
-
-
Save misodengaku/b3cf3c44a92c95f3b684 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#uselib "user32" | |
#cfunc FindWindow "FindWindowA" int, str | |
#func keybd_event "keybd_event" int, int, int, int | |
#func SetForegroundWindow "SetForegroundWindow" int | |
repeat | |
h = FindWindow(0, "PuTTY Fatal Error") | |
if h = 0: break | |
SetForegroundWindow h | |
keybd_event 13, 0, 0, 0 // Enter keydown | |
keybd_event 13, 0, 2, 0 // Enter keyup | |
mes h | |
wait 1 | |
loop | |
repeat | |
h = FindWindow(0, "PuTTY (inactive)") | |
if h = 0: break | |
SetForegroundWindow h | |
keybd_event 18, 0, 0, 0 // Alt keydown | |
keybd_event 115, 0, 0, 0 // F4 keydown | |
keybd_event 115, 0, 2, 0 // F4 keyup | |
keybd_event 18, 0, 2, 0 // Alt keyup | |
mes h | |
wait 1 | |
loop | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment