Skip to content

Instantly share code, notes, and snippets.

@SQLDBAWithABeard
Last active February 5, 2024 21:56
Show Gist options
  • Save SQLDBAWithABeard/ab2dd8c60bb8453aac88d981eb8321c6 to your computer and use it in GitHub Desktop.
Save SQLDBAWithABeard/ab2dd8c60bb8453aac88d981eb8321c6 to your computer and use it in GitHub Desktop.
Focus Assist change with powershell hack
# Focus Assist Off
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 700
[System.Windows.Forms.SendKeys]::SendWait("{TAB}{TAB} ")
Start-Sleep -Milliseconds 500
[System.Windows.Forms.SendKeys]::SendWait("(%{F4})")
# Focus Assist Priority
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 700
[System.Windows.Forms.SendKeys]::SendWait("{TAB}{TAB}{TAB} ")
Start-Sleep -Milliseconds 500
[System.Windows.Forms.SendKeys]::SendWait("(%{F4})")
#Focus Assist Alarms
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})")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment