How to control the API from AutoHotkey (or Python)?
Posted: Fri Jul 07, 2017 9:42 am
Hello,
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.
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.