Page 1 of 1

Can't ControlSend to Windows 10 "Universal Apps"

Posted: 22 Oct 2016, 19:14
by rhinox202
I have a script that currently works in IE but I'm trying to transition it over to Edge. In working on a script, I stumbled upon a function by lexikos (listed below) for getting the process name of a Windows App. The function works great, however, I thought it would fix my inability to ControlSend keys to Microsoft Edge. That was not the case. I have tried everything I can think of and, as such, was hoping for a little help. I've tried multiple variations of the commands below. No dice! Any help would be greatly appreciated. Thanks.

- ControlSend,, {Space}, Microsoft Edge ahk_exe ApplicationFrameHost.exe
- ControlSend, ApplicationFrameInputSinkWindow1, {Space}, ahk_id %name%

Code: Select all

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