AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

problem with winset and autohiding taskbar

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
chessonly



Joined: 06 Feb 2005
Posts: 26

PostPosted: Wed Jan 13, 2010 5:41 pm    Post subject: problem with winset and autohiding taskbar Reply with quote

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
View user's profile Send private message
Peter



Joined: 30 Dec 2005
Posts: 448

PostPosted: Thu Jan 14, 2010 7:56 am    Post subject: Reply with quote

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
View user's profile Send private message
chessonly



Joined: 06 Feb 2005
Posts: 26

PostPosted: Thu Jan 14, 2010 8:15 am    Post subject: Reply with quote

nope that didn't help Sad
Back to top
View user's profile Send private message
Peter



Joined: 30 Dec 2005
Posts: 448

PostPosted: Thu Jan 14, 2010 8:55 am    Post subject: Reply with quote

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
View user's profile Send private message
chessonly



Joined: 06 Feb 2005
Posts: 26

PostPosted: Thu Jan 14, 2010 9:15 am    Post subject: Reply with quote

k, thanksq
Back to top
View user's profile Send private message
Peter



Joined: 30 Dec 2005
Posts: 448

PostPosted: Thu Jan 14, 2010 11:37 am    Post subject: Reply with quote

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
View user's profile Send private message
chessonly



Joined: 06 Feb 2005
Posts: 26

PostPosted: Thu Jan 14, 2010 11:57 am    Post subject: Reply with quote

, as complicated as it is, yes that does seem to work! Smile
thanks a lot
edit: i spoke too soon Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group