I'm trying to create a script to detect the Action Center in Windows 10:
Opt("WinTitleMatchMode", 4)
Opt("WinSearchChildren", 1)
While 1
Sleep(50)
$hControl = ControlGetHandle("[CLASS:TrayNotifyWnd]", "", "Action Center, No new notifications")
If not $hControl = 0x00000000 and Not WinActive("[CLASS:TrayNotifyWnd]") Then
ConsoleWrite("True")
EndIf
Wend
I'm having issues detecting the Main Class and Window name of Action Center. I have used the Autoit Window Info Tool without success and I'm currently trying Microsoft Spy++. I want to detect the window when it is active.
If anyone has figured this out before or could lend some support it would be much appreciated.
I have also done research and think the Class could be Dwm and the Window Title is DWM Notification Window but I have been unsuccessful with both
Thank you
- red
Here is the Failed test with Autoit WindowInfo Tool:
Opt("WinTitleMatchMode", 4)
Opt("WinSearchChildren", 1)
While 1
_ActionCenter()
Wend
Func _ActionCenter()
;If @error Then MsgBox(16, "Error", "System tray not found")
if WinExists("[TITLE:Action center; CLASS:Windows.UI.Core.CoreWindow]") then
ConsoleWrite("True")
EndIf
EndFunc