- ControlSend,, {Space}, Microsoft Edge ahk_exe ApplicationFrameHost.exe
- ControlSend, ApplicationFrameInputSinkWindow1, {Space}, ahk_id %name%
Code: Select all
; https://autohotkey.com/boards/viewtopic.php?p=73137#p73137
WinGetActiveProcessName() {
WinGet name, ProcessName, A
if (name = "ApplicationFrameHost.exe") {
ControlGet hwnd, Hwnd,, Windows.UI.Core.CoreWindow1, A
if hwnd {
WinGet name, ProcessName, ahk_id %hwnd%
}
}
return name
}