Jump to content

Recommended Posts

Posted

Hello I use windows XP with "auto hide taskbar" option set, but from some reason (maybe some application I have running) it often stays up and does not hide. When I uncheck the option, click apply, check it and apply again it hides, but this is stupid. Is there a way to make taskbar hide by some script which I would put into quick launch or set a hotkey for it?

Posted

Well having to launch a script to do such a thing would be just as easy as keeping your taskbar unlocked and manually hiding it by dragging....

Posted (edited)

Even though I agree with weaponx, here's something that could solve your problem for now.

$hwnd = WinGetHandle("[CLASS:Shell_TrayWnd]")
$tPos = WinGetPos($hwnd)
Global $hidden = False

While 1
    Sleep(150)
    $mPos = MouseGetPos()   
    If $mPos[1]>$tPos[1] Then 
        _ShowTaskBar()
    Else
        _HideTaskBar()
    EndIf   
WEnd

Func _ShowTaskBar()
    If Not $hidden Then Return
    WinSetState($hwnd,"",@SW_SHOW)  
    $hidden = False
EndFunc

Func _HideTaskBar()
    If $hidden Then Return
    WinSetState($hwnd,"",@SW_HIDE)  
    $hidden = True
EndFunc
Edited by Nahuel
Posted (edited)

Wow this is great! Thanks very much. Actually my windows seems to be ready for reinstallation because it behaves strange and it's quite ridiculous, that I need this workaround to make my system do what it should do by default :-) I like having taskbar locked, because it takes less space and to me every pixel matters since I try to use every piece of screen efficiently ;-)

Edited by LoWang
  • 3 months later...
Posted

Dim $hShell_TrayWnd = WinGetHandle('[CLASS:Shell_TrayWnd]')
Dim $hStart = ControlGetHandle($hShell_TrayWnd, '', 'Button1')

WinSetState($hStart, '', @SW_HIDE)
Sleep(1000)
WinSetState($hShell_TrayWnd, '', @SW_HIDE)
Sleep(500)
WinSetState($hShell_TrayWnd, '', @SW_SHOW)
Sleep(500)
WinSetState($hStart, '', @SW_SHOW)

Usually, if you hide the entire taskbar then the start button is hidden too. Anyway, try the above code.

not work, i have always start button, maybe my os vista is french ??

Posted Image

Posted

Use AutoIt Window Info, or, WinSpy to get the button (if it's a button at all) ClassnameNN or ID or whatever that can help you to identify it using one of the Win* Control* functions.

thanks for your answer, but dont'work

Posted Image

I try replace

Dim $hStart = ControlGetHandle($hShell_TrayWnd, '', 'Button1')

for

Dim $hStart = ControlGetHandle($hShell_TrayWnd, '', 'Button')

thanks.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...