Eu encontrei um caminho (na discórdia oficial AHK chanel):
#Persistent
mpc := "C:\T4\mpc-hc 1.7.16 x64\mpc-hc64.exe"
avi := "C:\T1\scripts\avi.avi"
Run, % """" mpc """ """ avi """", , , pid
WinWaitActive, % "ahk_pid " pid
WinGet, mpc_hwnd, ID, % "ahk_pid " pid
SetTimer, CheckWindowPosition, 100
CheckWindowPosition:
if(!WinExist("ahk_pid " pid)) {
ExitApp
}
WinGetPos, x, y, width, height, % "ahk_pid " pid
WinGet, hwnd, ID, % "ahk_pid " pid
if(DllCall("GetParent", "Ptr", hwnd, "UInt", 3) = 0 && DllCall("GetAncestor", "Ptr", hwnd, "UInt", 3) = mpc_hwnd) {
if(x != 960 || y != 0 || width != A_ScreenWidth - 960 || height != A_ScreenHeight - 29) {
WinMove, % "ahk_pid " pid, , 960, 0, % A_ScreenWidth - 960, % A_ScreenHeight - 29
}
}
return