Page 1 of 1

How to control the API from AutoHotkey (or Python)?

Posted: Fri Jul 07, 2017 9:42 am
by MinorKey

hope you can help me and that what I'm about to ask won't be too much (although I have a hunch that it will).
I would want to develop a custom user interface for VoiceMeeter Banana. I would be happy with the native user interface, but truth be told, apart from a few exceptions, I can't really use it as it is now. The reason is that I'm a blind user and unfortunately the current GUI does not interact well with screen readers. To get around this, instead of using the GUI, I have been changing the values manually in XML files. Thank you, Vincent, for using XML instead of some proprietary format.

I know that asking Vincent to rewrite the GUI in some other language or toolkit is probably too much and so I got the idea to write my own GUI instead. I chose AutoHotkey as my language, because it gives instant results. From what I understand it should be possible to call the API from AHK, because AHK supports DLL calls and COM objects, but (and here it comes), I don't know how to go about it. It should be more simple than I think, but I'm not a programmer and although I have been programming a little, this is beyond my competence.
I would like to ask, is someone here familiar with AutoHotkey and if so, can he or she give me a simple example how to log in to the API, set and retrieve a parameter and log out? That should be all I'll need to get started.
If AHK is not possible for some reason, I know that for example Python GUIs developed with the wxPython framework give accessible results, so maybe you could give me a Python example as well, because I have been trying to write Python programs before.

A little explanation on how screen readers work:
Screen readers are programs that read everything found on the screen to the person in question in a synthesized voice. Of course, it's more complicated than that, but I hope that you can at least imagine how it works.
Screen reading programs perform great in a lot of applications, but in many others they practically don't work at all. This is because in order for the screen reader to read in a certain window some criteria have to be met. Unfortunately VoiceMeeterbelongs to the latter category of programs. Screen readers can only read the contents of a particular window if it contains controls that provide them with information they can use. As an example, every control should be given a meaningful name and it should pass that name to screen readers along with the control's current value. Additionally, the user interface should support keyboard navigation, such as moving between the various controls with tab or shift+tab. It's not so complicated as it sounds - in many cases it's only a matter of adding a couple of functions into the existing code. Of course, the concrete steps that have to be taken depend on the code itself and on the framework used to write that code (if any). Some frameworks (like QT for instance) have guidelines on making accessible applications and some others are accessible right out of the box. If one doesn't know where to get started or if a particular framework doesn't provide any guidelines on accessibility, Microsoft has a general set of recommendations that when followed typically give good results.

All the best and sorry for such a question/request.

Re: How to control the API from AutoHotkey (or Python)?

Posted: Tue Aug 08, 2017 3:18 pm
by CaptaPraelium
Hi MinorKey,

I had somewhat less noble reasons to also attempt to control Voicemeeter via AutoHotKey and found your posts yesterday, while looking for hints. I'm learning AHK as I go, but I thought I should touch base and let you know that I have had success in loading the DLL, logging in, sending basic commands, logging out, and unloading the DLL.

My code is horrible right now, I've literally just made it work minutes ago, so it's not something I would like to share just yet, but I wanted to let you know that I'm on the job.

My intention at this point, is to create an AHK file which can be used as a library, containing an object who's methods match those in the VBVMR documentation. This should act as a 'wrapper' for the VoiceMeeter API. I hope this would be suitable?


Re: How to control the API from AutoHotkey (or Python)?

Posted: Wed Aug 09, 2017 8:13 am
by Vincent Burel
i don't know what you are doing exactly, but feel free to post some example here.
and feel free to ask about API call sequence if needed.