返回前台窗口的句柄
#Include <WinAPI.au3> _WinAPI_GetForegroundWindow()
在MSDN中搜索
#include <WinAPI.au3> MsgBox(4096, "Handle", "Get Foreground Window: " & _WinAPI_GetForegroundWindow())