Hide/show Win10 "show hidden icons" button

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Sparr
Posts: 5
Joined: 13 Mar 2016, 15:35

Hide/show Win10 "show hidden icons" button

21 Feb 2018, 18:05

Hi , I used this code in Win7 to hide and show the "Show hidden icons" button in the task bar but it doesn't work in Win10. Any suggestions welcome.

Control, Hide, , Button1, ahk_class Shell_TrayWnd
;Control, Show, , Button1, ahk_class Shell_TrayWnd

Thanks
jimhoyle
Posts: 40
Joined: 19 Dec 2015, 15:49

Re: Hide/show Win10 "show hidden icons" button

21 Oct 2018, 09:31

That probably doesn't work in Win10 because/if there are more Buttons visible than there were in Win7. You can try these methods (read the comments for tips):

Code: Select all

^+7::ControlClick,Button2,ahk_class Shell_TrayWnd ; clicks the Show hidden icons ^ button so that even if the icons box is showing, it still shows instead of hides [you might want to trigger the same two times if it doesn't work, in some cases that might work more reliably]

^+8::
  IfWinExist ahk_class NotifyIconOverflowWindow
  {
    IfWinExist, ahk_class NotifyIconOverflowWindow
    WinHide ; Hide hidden icons if they were showing
  }
  Else
    ControlClick,Button2,ahk_class Shell_TrayWnd ; Show hidden icons
  Return

^+9:: ; toggle show/hide the so called hidden tray icons METHOD 2 FOR ONLY SOME PURPOSES [confirmed working on Windows 10 BUT works ONLY if hidden tray icons box was already once shown!]
  DetectHiddenWindows, On
  IfWinExist, ahk_class NotifyIconOverflowWindow 
  ; Window Exists
  {
    DetectHiddenWindows, Off    
    ; Check if its hidden
    IfWinNotExist, ahk_class NotifyIconOverflowWindow
    ; Script cant see it without detecting hidden windows, so...
    {
      WinShow
      Return
    }
    IfWinExist, ahk_class NotifyIconOverflowWindow
    ; Script sees it without detecting hidden windows, so..
    WinHide
  }
  ; NOTE: #b and {Space} sometimes works for opening the hidden icons box, however if any traytip is showing, #b will focus on the corresponding systray item instead of the ^ button so that's not a reliable method!
  Return

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], Joey5, RandomBoy and 349 guests