Jump to content


Photo

[function] DockA 1.0


  • Please log in to reply
13 replies to this topic

#1 majkinetor

majkinetor
  • Fellows
  • 4511 posts

Posted 19 October 2009 - 07:42 AM

D o c k A
Docking system for AHK windows.



Download          Documentation



#2 aaffe

aaffe
  • Members
  • 1024 posts

Posted 19 October 2009 - 08:11 AM

The download-Side doesnt work for me....

#3 majkinetor

majkinetor
  • Fellows
  • 4511 posts

Posted 19 October 2009 - 08:47 AM

fixed

#4 aaffe

aaffe
  • Members
  • 1024 posts

Posted 19 October 2009 - 08:48 AM

Thanks!

#5 majkinetor

majkinetor
  • Fellows
  • 4511 posts

Posted 21 October 2009 - 07:20 AM

Function parameters were badly documented. Fixed.

#6 Joy2DWorld

Joy2DWorld
  • Members
  • 562 posts

Posted 23 February 2010 - 07:18 PM

I see this not get so many comments so I add one:


WAY NICE!!!!



This is nicely coded function.



Edit: Couple of small possible bugs:

You are using STATIC variables to save global toggle states. This is not a good idea. You should use LOCAL variables instead.

#7 guest3456

guest3456
  • Guests

Posted 01 September 2010 - 08:12 AM

DockA bug reported in Forms Framework thread here:
http://www.autohotke...260.html#380260

#8 specter333

specter333
  • Members
  • 606 posts

Posted 28 December 2010 - 06:28 AM

I love DockA. It's so easy to use and works great.

I found what I think may be a bug while trying to call DockA as a library. I'm new to scripting so it may not be a bug.

Line 89
ifEqual, %HHost%,,return
I changed to
ifEqual, HHost,,return

When trying to call as a library I got the "This dynamic variable is blank..." error message. Removing the "%" has it working so far for my script.

Thanks for a great app.

#9 majkinetor

majkinetor
  • Fellows
  • 4511 posts

Posted 28 December 2010 - 01:58 PM

Yes, its a bug.
Thx.

#10 Chance

Chance
  • Members
  • 15 posts

Posted 30 December 2010 - 03:29 PM

Ok, so as the documentation of DockA.ahk said :

Using dock module you can glue windows to an AHK window.


So Majikinetor, if I want to glue a AHK script to a third part windows (i.e. notepad window) i have to use your other dock script, Dock.ahk, right ?

#11 majkinetor

majkinetor
  • Fellows
  • 4511 posts

Posted 30 December 2010 - 06:47 PM

Yes

#12 Lucid_Method

Lucid_Method
  • Members
  • 146 posts

Posted 09 March 2011 - 07:45 PM

Very useful majkinetor, thanks :-)

I have a 2 part question as I might not be taking the best approach to begin with. I am working on a tool that needs to be able to build GUI's dynamically, meaning I'm reading an INI file that has the coordinates for a collection of buttons that I'm turning into a GUI. To do this I have my main window that loads, then I read the INI file and generate the 2nd GUI. I want the 2nd gui to look/act as if it was built into main window.

I'm not sure if this is the best approach but it seems to work - where i build my main gui and then I generate the 2nd gui, using DockA to attach 2nd to the first and using the +owner1 config to make the 2nd window act like its part of the first. Is there a better way to build and attach a 2nd gui to the first gui using built in AHK functionality? If not this way works fine.. but comes my 2nd question ---

I can build the 2nd gui and attach it where I want it just fine when the 1st gui starts in a specific location on screen. I have the 2nd gui building at coordinate starting at 0,0 on the screen, so if the main window is moved to another monitor when it builds the 2nd gui it draws on the first monitor initially. Moving the main window forces the 2nd gui to reposition exactly where I want it to be positioned. I recognize that I could determine the window position of the first window before drawing the 2nd gui and adjust for the positioning that way, but it seems like it would be easier if I knew how to force DockA to automatically act as if I had just moved the main window - forcing DockA to move the 2nd gui to where I want it in relation to the main window.

Hopefully that makes sense - thanks :-)

**Edit** It looks like I can just move the main window by 1x coordinate and back quickly and that forces the redraw which will work, but the question still stands as to if this is the best approach?? Thanks

#13 guest3456

guest3456
  • Guests

Posted 10 March 2011 - 06:21 AM

you can check the bug link i posted earlier in this thread, when you go to the link, also read the next few posts, i had a similar problem with the docked window not 'attaching' itself until i dragged it, and i posted a quick solution to send WM_MOVE if you dont want to move 1 pixel and back

#14 DataLife

DataLife
  • Members
  • 745 posts

Posted 22 May 2013 - 12:32 AM

When I click on the client I can drag it away from the host.

 

How can I get prevent this? I only need the client to be able to be moved if the host is moved.

 

I am sure it has something to do with "You can monitor WM_WINDOWPOSCHANGED=0x47 to detect when user move clients (if they are movable) in order to update dock properties"

 

But I have no idea how to do that.

 

#include docka.ahk
Gui 1: add, text,, this is the host
Gui 1: show, w300 h300, Host
WinGet,HostID,ID, Host

Gui 2: add, text, ,this is the client
gui 2: show, w300 h300, Client
WinGet,ClientID,ID,Client
Docka(HostID, ClientID,  "x() y(1) w(1) h(,300)")  
return