 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
chessonly
Joined: 06 Feb 2005 Posts: 26
|
Posted: Wed Jan 13, 2010 5:41 pm Post subject: problem with winset and autohiding taskbar |
|
|
I have set windows taskbar to autohide. which means the taskbar only pops up when the win key is pressed OR the mouse is positioned at the bottom of the screen.
if the title bar of a window is removed using this code:
| Code: | | #b::WinSet, Style, ^0xC00000, A |
then the taskbar does not show up as it should. Sometimes. positioning the mouse at the bottom has no effect..
any solutions for this ? |
|
| Back to top |
|
 |
Peter
Joined: 30 Dec 2005 Posts: 448
|
Posted: Thu Jan 14, 2010 7:56 am Post subject: |
|
|
Maybe you're sometimes changing the style of the taskbar? Try: | Code: | #IfWinNotActive ahk_class Shell_TrayWnd ; taskbar is not active window
#b::WinSet, Style, ^0xC00000, A
#IfWinNotActive |
|
|
| Back to top |
|
 |
chessonly
Joined: 06 Feb 2005 Posts: 26
|
Posted: Thu Jan 14, 2010 8:15 am Post subject: |
|
|
nope that didn't help  |
|
| Back to top |
|
 |
Peter
Joined: 30 Dec 2005 Posts: 448
|
Posted: Thu Jan 14, 2010 8:55 am Post subject: |
|
|
| chessonly wrote: | | Sometimes. positioning the mouse at the bottom has no effect. | I've did some tests. It gives always problems with maximized windows.
I think Windows doesn't do what it promises in the setting "Keep the taskbar on top of other windows".
Maybe still a solution possible. I will look again when I've got some more time. |
|
| Back to top |
|
 |
chessonly
Joined: 06 Feb 2005 Posts: 26
|
Posted: Thu Jan 14, 2010 9:15 am Post subject: |
|
|
| k, thanksq |
|
| Back to top |
|
 |
Peter
Joined: 30 Dec 2005 Posts: 448
|
Posted: Thu Jan 14, 2010 11:37 am Post subject: |
|
|
That damn auto-hide taskbar is quite difficult to tame.
Maybe code can be more fine-tuned, but I tried several things, and at the end always some problem came up again.
I did some testing, and this seems to work, but not 100% guarantee: | Code: | WinGet, taskbarID, id, ahk_class Shell_TrayWnd
#IfWinNotActive ahk_class Shell_TrayWnd ; taskbar is not active window
#b::
WinGet, activeID, id, A
WinSet, Style, ^0xC00000, ahk_id %activeID%
WinGet, winStyle, style, ahk_id %activeID%
if !(winStyle & 0xC00000){
sleep 1500 ; delay seems necessary, I don't know exactly why though
DllCall("SetWindowPos", "uint", taskbarID, "uint",0, "int",0, "int",0, "int",0, "int", 0, "uint", 0x253)
; 0x253: SWP_NOACTIVATE= 0x10 SWP_NOOWNERZORDER= 0x200
; SWP_SHOWWINDOW= 0x40 SWP_NOMOVE= 2 & SWP_NOSIZE= 1 (->all coord. can = 0)
WinGetPos, X, Y, Width, winH, ahk_id %activeID%
WinMove, ahk_id %activeID%, , , , , % winH - 6 ; necessary? after a Win-key
WinSet, AlwaysOnTop, off, ahk_class Shell_TrayWnd
WinSet, AlwaysOnTop, on, ahk_class Shell_TrayWnd
tooltip taskbar recovered ; for testing
}
else
tooltip
return
#IfWinNotActive |
|
|
| Back to top |
|
 |
chessonly
Joined: 06 Feb 2005 Posts: 26
|
Posted: Thu Jan 14, 2010 11:57 am Post subject: |
|
|
, as complicated as it is, yes that does seem to work!
thanks a lot
edit: i spoke too soon  |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|