[Function] Attach v1.3

Post your working scripts, libraries and tools for AHK v1.1 and older
User avatar
jballi
Posts: 724
Joined: 29 Sep 2013, 17:34

[Function] Attach v1.3

Post by jballi » 24 Jul 2015, 15:06

Introduction
Attach is a popular alternative to Titan's Anchor function published by majkinetor in 2009 - 2010. majkinetor appears to have moved on from AutoHotkey to bigger and better things so there hasn't been an update to any of his stuff for a long while. Most of his stuff still works so there hasn't been much of a fuss about it.

When Attach was first released, I started to use it right away. I was having all kinds of problems with Anchor at the time and so Attach was a welcome alternative. I recently started to upgrade some of my projects to work on x64 and I discovered that Attach was not working as expected.

v1.2
I've upgraded Attach to work on all versions of AutoHotkey, including x64.

Disclaimer: Although I have made a lot of changes, the original logic remains intact. majkinetor includes a lot of logic and behind-the-scenes nonsense that I don't entirely understand. It works and so I didn't mess with it. The final version includes a lot more changes than were really necessary but I has having a lot of trouble debugging the original and so I reformatted the function so that I could understand it better.

I'm posting this version of Attach for developers who, like me, have made a programming investment in the function and would like to continue using it with AutoHotkey x64. The documentation within the script includes an example if you want to try/test it for yourself.

The Code
Attach.ahk


v1.3
Version 1.3 was created because of the relatively new Tab3 control. Version 1.2 does not work with the Tab3 control at all. My original intention was to abandon the Attach function and move to AutoXYWH, but AutoXYWH has problems of it's own with the Tab3 control and so I decided to take a stab at fixing the Attach function.

v1.3 represents the first pass at getting the function to work correctly with the Tab3 control without destroying any of the original functionality. Although I have tested it, I cannot guarantee that it will work in all situations. v1.3 is slightly less efficient than v1.2 because of the extra work that is needed to resolve Tab3 issues but in most cases, it is not noticeable. In addition, v1.3 will only run on AutoHotkey v1.1+.

Code: Attach.ahk
Doc: Attach.html
Examples: Simple Example, Tab3 Example
Last edited by jballi on 11 May 2020, 22:51, edited 2 times in total.
nli

Re: [Function] Attach for x64

Post by nli » 24 Jul 2015, 16:47

Just for reference:
User avatar
jballi
Posts: 724
Joined: 29 Sep 2013, 17:34

Re: [Function] Attach v1.3

Post by jballi » 22 Oct 2016, 22:25

v1.3: Updated to work with the new Tab3 control. See the first post for more information.
skydive241
Posts: 7
Joined: 27 Apr 2020, 10:42

Re: [Function] Attach v1.3

Post by skydive241 » 11 May 2020, 14:13

Hi, jballi!

Your dropbox links don't work anymore - can you fix the links? I'd like to test your version of attach for a tool of mine. :)

Greetings
Patrick
User avatar
jballi
Posts: 724
Joined: 29 Sep 2013, 17:34

Re: [Function] Attach v1.3

Post by jballi » 11 May 2020, 22:53

The links have been updated. Let me know if you have any problems downloading any of the files.
skydive241
Posts: 7
Joined: 27 Apr 2020, 10:42

Re: [Function] Attach v1.3

Post by skydive241 » 12 May 2020, 00:37

Thanks - links work now! :)
Post Reply

Return to “Scripts and Functions (v1)”