Quantcast
Channel: AutoHotkey Community
Viewing all articles
Browse latest Browse all 579

Ask for Help (v1) • Re: Enable "autohide taskbar" when app is in focus, disable when not

$
0
0
Ideas are below.

CODE:

#Requires AutoHotkey v1.1.35
#Persistent
Process Priority,, B
SetTimer Check, 1000
Check:
WinActive("A")
WinGet procPath, ProcessPath
WinGetClass winClass
If !InStr(procPath, "explorer.exe") || winClass = "CabinetWClass" {
ToolTip % procPath
adobe := InStr(procPath, "\Adobe\") > 0
autoHide := DllCall("Shell32\SHAppBarMessage", "UInt", 4 ; ABM_GETSTATE
, "Ptr", &APPBARDATA, "Int")
If (adobe ^ autoHide)
taskbarAutoHide(adobe)
}
Return

taskbarAutoHide(autoHide:= True) {
RunWait % "powershell -command ""&{$p='HKCU:SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StuckRects3'"
. ";$v=(Get-ItemProperty -Path $p).Settings;$v[8]="
. (autoHide ? 3 : 2)
. ";&Set-ItemProperty -Path $p -Name Settings -Value $v;&Stop-Process -f -ProcessName explorer}"""
,, "Hide"
SoundBeep 800
Sleep 10000
}

Statistics: Posted by mikeyww — 29 minutes ago



Viewing all articles
Browse latest Browse all 579

Trending Articles