Jump to content

Docking All Windows


Recommended Posts

is there a way to make a script able to toggle docking for ALL windows.

I am writing a window manager and I'd like to include an option to have all windows able to dock to each other or the sides of the screen.

[u]You can download my projects at:[/u] Pulsar Software
Link to comment
Share on other sites

Here is script Maximize_all.au3

$var = WinList()

For $i = 1 to $var[0][0]
  ; Only display visble windows that have a title
  If $var[$i][0] <> "" AND IsVisible($var[$i][1]) Then
     WinSetState($var[$i][0],"", @SW_MAXIMIZE)
  EndIf
Next

Func IsVisible($handle)
  If BitAnd( WinGetState($handle), 2 ) Then 
    Return 1
  Else
    Return 0
  EndIf
EndFunc

You can change WinSetState() to WinMove() by your needs ...

Link to comment
Share on other sites

that isn't quite what I meant...I want a way within a script to activate or deactivate docking for windows. I'd like the script, when the option is activated, to recognize when borders of open windows come in contact and automatically dock them, or if a window hits the side of the screen to dock it there.

[u]You can download my projects at:[/u] Pulsar Software
Link to comment
Share on other sites

Hi,

I think the best method would be to use WinGetPos() and see if the position of any window overlaps the area covered by another window. In cases of the desktop sides, the same method can be used by checking if a window's borders exceed that of the desktop's resolution by using the @desktopwidth and @desktopheight.

It will take a fair bit of thinking to get it done but im sure you will figure it out using those functions :)

I will try and get something together for you if no one else posts any code up in the new few days

Dave

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!!

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...