3

I want to automate this to trigger every day at certain intervals, it seems so hard to configure a good notification system in Windows 10.

I would like to trigger the Windows focus "Alarms only" mode at certain intervals throughout the day, is this possible?

See Image

Destroy666
  • 12,350
Yedya
  • 31

1 Answers1

1

There's a PowerShell workaround which revolves around clicking menu entries:

Add-Type -AssemblyName System.Windows.Forms
[System.Windows.Forms.SendKeys]::SendWait("(^{ESC})")   
Start-Sleep -Milliseconds 500   
[System.Windows.Forms.SendKeys]::SendWait("(Focus Assist)")   
Start-Sleep -Milliseconds 200   
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}")   
Start-Sleep -Milliseconds 500  
[System.Windows.Forms.SendKeys]::SendWait("{TAB}{TAB}{TAB}{TAB}{TAB}")  
Start-Sleep -Milliseconds 500     
[System.Windows.Forms.SendKeys]::SendWait("(%{F4})")

Source. This basically opens Start menu, searches Focus Assist, opens settings for it, goes to proper field with Tab, marks the radio with Space and closes the window.

Of course it might not work if you're doing something else at that time and interrupt it, PowerShell is not the best tool for GUI automation.

Similar, more reliable script could be created with AutoHotkey, which could be combined with BlockInput to ensure proper execution and/or send keys to the proper window with ControlSend or by clicking on specified GUI elements.

And alternatively you can automate Win + A instead, which opens the actions center with a tile which can be switched to Alarms only.

Destroy666
  • 12,350