Jump to content

hide taskbar utility


LoWang
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 3 months later...

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...