AutoHotkey: Alt-Tab fix when minimized to tray

From TotalcmdWiki
Jump to navigation Jump to search

You can minimize TC to the system tray. However, you can still alt+tab to it, but you'll then have to press Enter to restore it, i.e. the infamous (Press ENTER after Alt+Tab) message.

This tiny script fixes that.

#Persistent
#SingleInstance force
#NoTrayIcon

SetTimer subTimer, 2000

subTimer:
   If WinActive( "ahk_class switchwin2" )
   {
      SendInput, {Enter}
   }
Return

Back to AutoHotkey