AutoHotkey Community

It is currently May 27th, 2012, 12:49 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: May 17th, 2009, 3:28 pm 
Offline

Joined: February 2nd, 2009, 2:03 pm
Posts: 112
The one from indiglo works really nice because it resizes items and full screen windows after it hides taskbar, only 2 bugs...
it will show on mouse hover after a while and if you enable TV out then system tray will show on TV part.
Any help?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 24th, 2009, 5:03 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
A similar solution here


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 24th, 2009, 2:29 pm 
Offline

Joined: December 24th, 2009, 2:21 pm
Posts: 14
a_h_k,

The similar solution is this one :).

I simply adapted the code you guys have developed to make it dock savvy.

I've given you credit as you will see if you follow a_h_k's link.

I've been looking for some time for a way to kill and resurrect the taskbar because I really hate the windows autohide mechanism. When you drift near the edge your taskbar is on, it pops up when you really want it to stay hidden.

This gives me the control I want.

I've also added a hot corner to it, so the taskbar glides in and out when you move your mouse to a specified corner.

http://rocketdock.com/addon/docklets/26821


Last edited by Lewrex on December 28th, 2009, 2:59 pm, edited 12 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 26th, 2009, 3:10 am 
Offline

Joined: December 24th, 2009, 2:21 pm
Posts: 14
If you put the WinShow first when unhiding, the taskbar glides back into place instead of snapping in:

See this section:

{
If x=0
{
WinShow ahk_class Shell_TrayWnd
NumPut( ( ABS_ALWAYSONTOP := 0x2 ), APPBARDATA, 32, "UInt" )
DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )
x=1
return
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 27th, 2009, 3:34 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
a_h_k wrote:
I put this link in this thread, as i was sure your rocketdock link only referenced this thread (?). My link also goes straight to the working version in the thread

I don't use docks, nor Vista, but it sounds very good what you've done :)

I was just helping a guy out with some "random" code, and it just so happened that it helped to satisfy a fairly long-standing want for some - that of to reliably show/hide the taskbar/SM, which is great!!!
I'm pleased that the code is being put to good use! :D

Here is something i worked on several months ago (basic version working, but still need to complete): Improved Windows autohide sidebar
It's another way to deal with the problem of the auto-hide taskbar popping-up when you don't want it to. It keeps the taskbar as auto-hidden & behind all other windows, at all times. But when the mouse HOVERS for a USER-SET TIME, the taskbar then appears. Also it makes the taskbar go away whenever you focus on another window. Also resolves nuisance of Windows keeping taskbar showing a few seconds after a balloon tip first appears. Also uses the clickless way (there's a name for it) of invoking SM & SM sub-menus
I've have to continue work on it one of these days...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 28th, 2009, 3:28 pm 
Offline

Joined: December 24th, 2009, 2:21 pm
Posts: 14
a_h_k,

I don't think your tool works in Win7. I downloaded it, but in Win 7 it didn't seem to do as you describe.

I have Vista on another machine, but haven't tried it on that one yet.

I've been playing with my toggler some more and have added quite a bit of new functionality to do with screen resolutions and hot corner options. I'm going to put it on my website. No charge of course and will give you full credit since the actual toggle bit is your work, but lots has now come from myself and elsewhere, so I think I'll keep working on it and just keep updating on my site (which I'm in the process of finishing).

In the meantime, the latest version is on the RocketDock site:
http://rocketdock.com/addon/docklets/26821


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 29th, 2009, 4:29 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
Lewrex wrote:
I don't think your tool works in Win7. I downloaded it, but in Win 7 it didn't seem to do as you describe

I have Vista on another machine, but haven't tried it on that one yet

Yeah, it probably doesn't work on 7 or Vista (yet), as i only created it on XP.
As i mentioned before, i'll need to work some more on it .. but maybe sooner than later? :wink:


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 26th, 2010, 1:53 pm 
Offline

Joined: December 24th, 2009, 2:21 pm
Posts: 14
I've made it a bit more automated:

http://www.autohotkey.net/~Lewrex/

_________________
---------------
Dallas


Report this post
Top
 Profile  
Reply with quote  
 Post subject: Re: Better Script
PostPosted: March 1st, 2010, 12:36 am 
Offline

Joined: February 24th, 2010, 6:28 am
Posts: 7
Location: Falls Church, VA
indiglo wrote:
I was looking for something like this for a while, and this thread helped me finally make something that works, so I figured I would let people know how to do it.

Thanks very much to EricCartman for the function calls, really all I did was fix the structure of the code.

Eric's code was working perfectly until I realized it was using 25% processor :shock: when the taskbar was showing.

This code uses no looping mechanisms, so it doesn't do anything except when you want it to.

Code:
{
   DetectHiddenWindows, On
   VarSetCapacity( APPBARDATA, 36, 0 )
   NumPut( ( ABS_ALWAYSONTOP := 0x2 )|( ABS_AUTOHIDE := 0x1 ), APPBARDATA, 32, "UInt" )
   DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )
   Sleep 10                                ;Sometimes the bar doesn't get hidden 'all of the way' this prevents that.
   WinHide ahk_class Shell_TrayWnd
} ;If you want the taskbar to start visible, delete this block.

x=1

f12::  ;The key used to toggle the taskbar. Change it as you like.
{
   If x=0
   {
      NumPut( ( ABS_ALWAYSONTOP := 0x2 ), APPBARDATA, 32, "UInt" )
      DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )
      WinShow ahk_class Shell_TrayWnd
      x=1
      return
   }

   If x=1
   {
      DetectHiddenWindows, On
      VarSetCapacity( APPBARDATA, 36, 0 )
      NumPut( ( ABS_ALWAYSONTOP := 0x2 )|( ABS_AUTOHIDE := 0x1 ), APPBARDATA, 32, "UInt" )
      DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )
      Sleep 10
      WinHide ahk_class Shell_TrayWnd
      x=0
      return
   }
}


For people wondering how to 'install'/ 'where' to write this (as I did at first): 1-Download and install autohotkey. 2-Simply copy the above code and paste it into notepad. 3-save this file as a .ahk file. 4-open the file to run the script.

I'm not sure how to get this to happen automatically when you log in, but I don't know that much about autohotkey. I'm sure there is some way to do it if you look

Hope this helps.



First, Thank you for the script. This is the info I was looking for.

I noticed a few problems with the script and was wondering if some one could help me resolve them.

1. When my laptop goes to sleep and then wakes back up the auto hide mechanism is active again. In other words if you move your pointer down to the bottom of the screen the task bar jumps up. Now of course you can reactivate the intended behavior by pressing F12 twice, but I would like to find out how to prevent this from happening when returning from sleep mode.

2. If you press the windows key while the taskbar is hidden, the windows logo button remains visible and active after pressing the windows-key again.

I've thought of some code that will fix number two, but I'm not sure how to fix number one. I did find a post on how to detect sleep mode and returning from sleep mode:

http://www.autohotkey.com/forum/topic21 ... sleep+mode

It seems possible to re-initiate the the stay hidden function using the code in that thread, but there must be a more elegant solution than that.

Why does the script not work correctly after sleep mode?

Any help is greatly appreciated :-)

Dean


Report this post
Top
 Profile  
Reply with quote  
 Post subject: A Shorter Solution
PostPosted: April 7th, 2010, 7:05 pm 
I find this to be a more elegant solution (it's adapted from those above)

Code:
^F10::ToggleAutoHideTaskBar()

ToggleAutoHideTaskBar()
{
   VarSetCapacity( APPBARDATA, 36, 0 )
   NumPut(36, APPBARDATA, 0, "UInt") ; First field is the size of the struct
   bits := DllCall("Shell32.dll\SHAppBarMessage"
             ,"UInt", 4 ; ABM_GETSTATE
             ,"UInt", &APPBARDATA ) 
  NumPut( (bits ^ 0x1), APPBARDATA, 32, "UInt" ) ; Toggle Autohide
  DllCall("Shell32.dll\SHAppBarMessage"
             ,"UInt", ( ABM_SETSTATE := 0xA )
             ,"UInt", &APPBARDATA )
}


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 8th, 2010, 1:09 pm 
the script is great.
but its possible to hide taskbar total. not autohide?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: June 9th, 2010, 1:59 am 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
The similar solution i mentioned before...
Code:
#NoEnv
#NoTrayIcon
#SingleInstance force
DetectHiddenWindows, Off   ;for IfWinExist

VarSetCapacity( APPBARDATA, 36, 0 )
;------------------------------------------------------------
; Fetch current hidden/showing status

IfWinNotExist, ahk_class Shell_TrayWnd
  TaskbarAndStartToggleState = 0     ;Currently hidden (not showing)
Else
  TaskbarAndStartToggleState = 1     ;Currently non-hidden (showing)
;------------------------------------------------------------
Gosub +z   ;Toggle the taskbar/SM state
;------------------------------------------------------------
Exit
;------------------------------------------------------------
+z::
 TaskbarAndStartToggleState := Func(TaskbarAndStartToggleState)
Return

Func(TaskbarAndStartToggleState)
{
   Global APPBARDATA

   If TaskbarAndStartToggleState = 0
   {
      NumPut( (ABS_ALWAYSONTOP := 0x2), APPBARDATA, 32, "UInt" )           ;Enable "Always on top" (& disable auto-hide)
      DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )

      WinShow ahk_class Shell_TrayWnd
      Return 1            ;Now showing
   }
   
   If TaskbarAndStartToggleState = 1
   {
      NumPut( ( ABS_AUTOHIDE := 0x1 ), APPBARDATA, 32, "UInt" )            ;Disable "Always on top" (& enable auto-hide to hide Start button)
      DllCall( "Shell32.dll\SHAppBarMessage", "UInt", ( ABM_SETSTATE := 0xA ), "UInt", &APPBARDATA )

      WinHide ahk_class Shell_TrayWnd
      ;WinHide ahk_class Shell_TrayWnd   ;don't need this 2nd one?
      Return 0            ;Now hidden
   }
}


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 9th, 2010, 8:39 am 
ahh great. thank you :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: December 30th, 2010, 11:35 am 
Offline

Joined: December 21st, 2007, 9:33 am
Posts: 10
With all the scripts that are listed here, the taskbar hides, but the windows don't maximize -- there's just blank space where the taskbar used to be through which the desktop wallpaper shows. Is there a way to make windows maximize?..


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 19th, 2011, 12:32 pm 
Offline

Joined: February 2nd, 2008, 4:35 am
Posts: 643
I sure i answered something exactly like this not long ago..

_________________
My Ahk Site


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 32 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: Exabot [Bot], Ohnitiel, WillTroll, XstatyK and 16 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group