>>518
いいなーv2はrunscript()なんてあるんだ
dllcallでattachしてとか地味に長い関数書いてた

Run, %exec_command% %arg%,, Hide, pid
WinWait, ahk_pid %pid%
DllCall("AttachConsole", "UInt", pid)
WshShell := ComObjCreate("Wscript.Shell")
exec := WshShell.Exec("%ComSpec% /u /c " . exec_command . " " . arg)
output := exec.StdOut.ReadAll()
DllCall("FreeConsole")