Jump to content

how do i show/hide the taskbar (autohide)


Recommended Posts

how do i show/hide the taskbar (autohide), i've searched & come up with this:

_TaskbarSetState(@SW_HIDE)
Sleep(2000)
_TaskbarSetState(@SW_SHOW)

Func _TaskbarSetState($s_State)
    $s_PrevOpt = Opt("WinTitleMatchMode", 4)
    WinSetState("Classname=Shell_TrayWnd","",$s_State)
    Opt("WinTitleMatchMode",$s_PrevOpt)
EndFunc

this hides it completely, im talking about the autohide (checkbox of the taskbar settings).

what i'm wanting to do is show the taskbar, unhide the scripts hidden icon,wait a sec,hide the icon, hide the taskbar

i've got the iconhide all done, its just i can't find how to show/hide the taskbar without giving focus to it.

i was thinking i could use dllcall(), but i havn't a clue how to use & the info for the taskbar, this might be the way to go, but i havn't a clue how.

this brings up this poste, i'd appreciate any help. :shocked:

sorry about my grammar, i never grew out of that... least in typing

people are anoying, am i? ;) v2.95
Link to comment
Share on other sites

Probably use regmon to figure out the registry changes needed.

Edited by Uten
Link to comment
Share on other sites

im not talking about toggling the autohide option, but hiding/showing using autohide (im thinking its some kind of dll cmd)

like when you move your mouse to the edge of the screen, it shows.

sorry if i worded it wrong or completely wrong...

people are anoying, am i? ;) v2.95
Link to comment
Share on other sites

  • 2 weeks later...

This would be useful to me also.

Has anyone come up with a script that works to show/hide the Taskbar from a GUI?

Thanks,

gsb

I read that it is not possible to programmatically change the autohide state of the task bar. However, the task bar on my PC often changes the Auto hide feature to off while I'm using Firefox, and I have to set it back manually. I concluded that something must be changing it so I must be able to change it back, but all my searches lead to statements that it can't be done.

I think Windows reads a registry on start up to determine whether autohide is on and then never reads it again untill the next startup, but just changes the registry setting when you change the state of the autohide check box.

However it is easy to bring up the task bar and then hide it again if autohide is true. But I don't understand this bit -

what i'm wanting to do is show the taskbar, unhide the scripts hidden icon,wait a sec,hide the icon, hide the taskbar

i've got the iconhide all done, its just i can't find how to show/hide the taskbar without giving focus to it.

Where is the scripts hidden icon? As soon as another window gets focus the task bar will go if it has autohide set so I don't think you can ever show the taskbar if it hasn't got focus.

I don't know what youare trying to achieve so this next suggestion might be stupid. If you are just wanting the task bar to look like it's appearing to the user then why not make a window with an image which is a screen shot of the task bar. Then you could put your icons on there, allow someone to click them or whatever and completely control what happened.

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

AutoItSetOption("TrayIconHide", 1)

But that's not the task bar.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

It seems easier than that.

Seems AutoHide simply "moves" the taskbar off screen.

So, it simply a mater of math:

1) save the old position,

2) move it to onscreen,

3) insure it is not "hidden" and

4) activate it.

When done put it back.

gsb

"Did you ever stop to think? ...and forget to restart!"
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...