; Author: jgpaiva
;
; Script Function:
; mimmics windows taskbar autohide without the annoying popup on window
; flash
;
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
#persistent
#singleinstance,force
EdgeTime := 200
Edge = Bottom
inborder := false
WinHide,ahk_class Shell_TrayWnd
CoordMode,mouse,screen
Settimer,FollowMouse%Edge%,100
return
ShowTaskbar:
if (!inborder)
return
WinHide,ahk_class Shell_TrayWnd
WinShow,ahk_class Shell_TrayWnd
settimer,FollowMouse%Edge%,off
loop
{
sleep,100
MouseGetPos,,,WindowId
WinGetclass,TrayClass,ahk_id %WindowId%
if (TrayClass <> "Shell_TrayWnd")
break
}
settimer,FollowMouse%Edge%,on
WinHide,ahk_class Shell_TrayWnd
return
FollowMouseLeft:
MouseGetPos,MouseX,MouseY
If(MouseX = 0 AND !inborder)
{
inborder := true
settimer,ShowTaskbar,-%EdgeTime%
return
}
If(MouseX <> 0 AND inborder)
{
inborder := false
settimer,ShowTaskbar,off
return
}
return
FollowMouseBottom:
MouseGetPos,MouseX,MouseY
If(MouseY = A_screenheight -1 AND !inborder)
{
inborder := true
settimer,ShowTaskbar,-%EdgeTime%
return
}
If(MouseY <> A_screenHeight -1 AND inborder)
{
inborder := false
settimer,ShowTaskbar,off
return
}
return
FollowMouseTop:
MouseGetPos,MouseX,MouseY
If(MouseY = 0 AND !inborder)
{
inborder := true
settimer,ShowTaskbar,-%EdgeTime%
return
}
If(MouseY <> 0 AND inborder)
{
inborder := false
settimer,ShowTaskbar,off
return
}
return
FollowMouseRight:
MouseGetPos,MouseX,MouseY
If(MouseX = A_screenWidth -1 AND !inborder)
{
inborder := true
settimer,ShowTaskbar,-%EdgeTime%
return
}
If(MouseX <> A_screenWidth -1 AND inborder)
{
inborder := false
settimer,ShowTaskbar,off
return
}
return