AccV2

Post your working scripts, libraries and tools for AHK v1.1 and older
SOTE
Posts: 1426
Joined: 15 Jun 2015, 06:21

Re: AccV2

21 Dec 2017, 13:40

guest3456 wrote:anyway to keep this library backward compatible with old acc scripts? maybe you and jeeswg can work together?
Agree. Jeeswig recently helped me out and introduced me to Acc. Looks like these guys teaming up would be great for the community, or perhaps at least in communication and bouncing some ideas off of each other.
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: AccV2

21 Dec 2017, 14:22

- The way I see it is that people will still want to continue using the original Acc functions. So I would recommend that any new libraries, including this one, use a different prefix e.g. Acc2_, AccV2_, AccObj_, and/or a suffix e.g. Acc_ChildrenEx, so that there is no confusion. If a function maintains/extends functionality but doesn't reduce it, i.e. you can use the function as before without modifying code lines, perhaps the original name could be kept for use in an updated function.
- My main concern re. Acc is to rewrite AccViewer and iWB2 Learner for AHK v2. Simplifying/restructuring the code, but giving the same functionality. Both scripts are incredibly fiddly, plus there are new AHK v2 errors to deal with. It's possible that I'll get round to it in the next few months. But, this wouldn't add any new functionality, and I have other more useful projects to get on with. I do intend to do this eventually.
- Re. me and additions to Acc. I have a few very basic additions to Acc that I might like to write, basically, functions to convert between English and local role/state text. I have thought that I might try and write a function that gets the element under the cursor, and shows the relevant paths up to each control/the main window. I might look at this within weeks.
- sancarn is welcome to incorporate any ideas mentioned here or used in any Acc scripts that I've written, into his library. And to use any Acc code that I've written, minimally/maximally changed. I'm willing to give any suggestions/pointers or code to help with sancarn's library.
- My main concern is UI Automation, I don't really know anything about it, I don't know of any examples of things that it can do, that Acc can't do, that would be useful to me. I think that other people would have to work on this to get this up and running. But I think that this is the important work that needs to be done. That, and ways to automate Firefox and Chrome (and other web browsers) via Selenium, but also, more directly.
- Also, I think I'll start a thread for anyone who has ideas for additions to the Acc library.
- [EDIT:] I've started a new thread here.
Acc library: Ideas for new functions. - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=5&t=41688
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
sancarn
Posts: 224
Joined: 01 Mar 2016, 14:52

Re: AccV2

22 Dec 2017, 04:26

just me wrote:Because of this topic and because I had the time I tried to complete my scripts in regard to the basic features. I'm still not interested enough to do further development, but I want to share what I have so far. Maybe you or someone else is interested in using (parts) of the code and will save some time. It can be used without any restrictions or conditions. I tested the code to some degree and hopefully found and fixed the most bugs.
Hey just me, sorry that I missed your message till now but, thanks for the donation! To be fair, I only really 'have time' when I'm working with Acc and think 'Man... I wish this was better...' :P. Regardless, when I do finally get around to it, your libraries will be a fantastic resource! So thanks for these
jeeswg wrote:Use a different prefix e.g. Acc2_, AccV2_, AccObj_,
That's a good idea, at least for now. In the future, though, the idea is to have no prefix but a few classes. Still, I guess it wouldn't be a bad idea to make a prefix for those...
jeeswg wrote:My main concern is UI Automation, I don't really know anything about it, I don't know of any examples of things that it can do, that Acc can't do, that would be useful to me. I think that other people would have to work on this to get this up and running.
Indeed! Originally I was into UI Automation framework, but it really feels to offer few benefits in comparison to Acc. It provides some nice methods of seeking for structures and it actually gives access to the root object with a function. It does also provide a lot of new event handlers which is really nice! Such event handlers would be great for acc_viewer. You can see some overview here.
Helgef
Posts: 4709
Joined: 17 Jul 2016, 01:02
Contact:

Re: AccV2

23 Dec 2017, 06:56

Hello and thank you to everyone for sharing your efforts, I will be following your github repo sancarn :thumbup:.
@ just me, your work looks excellent, as would be expected of course. Thanks for sharing :clap:.
I have a small comment, it might be of general interest, regarding

Code: Select all

try objRelease(ptr)
As far as I know, objRelease doesn't throw on v1, it does on v2, but the error condition is just ptr < 2**16. try will not protect against other mistakes, which might cause unexpected behaviour, such as application crash. objRelease is one of the dangerous functions, the logic of the script must ensure only valid pointers are passed to it.

Happy holidays :xmas:
just me
Posts: 9552
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: AccV2

23 Dec 2017, 11:00

Hi Helgef,

the reference counting was one of the parts I spent some time on. I hope I finally got it right, at least I noticed no problems while testing. For each object created using an existing interface pointer, the reference counter should be increased by one. So I hope that ObjRelease() should never cause problems.

Merry Christmas! :xmas:

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: Bing [Bot] and 66 guests