[function] DockA 1.0
#1
Posted 19 October 2009 - 07:42 AM
#2
Posted 19 October 2009 - 08:11 AM
#3
Posted 19 October 2009 - 08:47 AM
#4
Posted 19 October 2009 - 08:48 AM
#5
Posted 21 October 2009 - 07:20 AM
#6
Posted 23 February 2010 - 07:18 PM
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
Posted 01 September 2010 - 08:12 AM
#8
Posted 28 December 2010 - 06:28 AM
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%,,returnI 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
Posted 28 December 2010 - 01:58 PM
Thx.
#10
Posted 30 December 2010 - 03:29 PM
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
Posted 30 December 2010 - 06:47 PM
#12
Posted 09 March 2011 - 07:45 PM
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
Posted 10 March 2011 - 06:21 AM
#14
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




