The hotkeys work by themselves. But not with the watcher. win spy gives me a few ideas to get it working. But no luck. The Win+Shift+V is the standard hotkey to select a notification on Windows so I don't need a select window or mouse click sort of a thing.
Code: Select all
#Persistent
counter := 0
SetTimer, CheckForNotificationWindow, 1000 ; checks every second
CheckForNotificationWindow:
counter += 1
If counter > 30
{
SetTimer, CheckForNotificationWindow, Off ; disables the timer after 30 checks
}
else
{
IfWinExist, Add a device ahk_class Windows.UI.Core.CoreWindow ahk_exe ShellExperienceHost.exe
{
WinActivate
Send, #+v ; Win+Shift+V
Sleep, 100
Send, {Enter}
Sleep, 700
Send, {Enter}
Sleep, 700
Send, {Enter}
Sleep, 700
Send, {Tab}
Sleep, 700
Send, {Enter}
Sleep, 700
Send, !{F4} ; Alt+F4
}
}
return