What is it?The attached VoiceAttack profile provides the means to use AutoHotkey functionality (version 1.1.29.01 as of this writing) within the VoiceAttack environment through C# inline functions. This project (VA-AHK.Integration) expands VoiceAttack's capabilities (i.e., directly leverage AutoHotkey functionality for use by VoiceAttack), provides more control over AutoHotkey processing, and enables easy communication between AutoHotkey and VoiceAttack. And you don't even need to have the AutoHotkey software installed.
So in summary this functionality may be useful for folks who use AutoHotkey scripts in conjunction with VoiceAttack and want:
- Greater control over AutoHotkey script execution via VoiceAttack, which is handy especially for running VoiceAttack actions/commands in series with AutoHotkey scripts
- A simple framework for passing variable data back and forth between AutoHotkey and VoiceAttack
Why would you do this?During the early development of the (now obsolete)
Physical keyboard & mouse input blocking profile I did a lot of research on how to use AutoHotkey to accomplish the task. In doing so I discovered amazing-andrew's
AutoHotkey.Interop project on GitHub and I decided to take on the challenge of adapting his work for use with VoiceAttack.
I'm guessing that 2% (or less) of users will be interested in this...but that's okay
So how do I use it?If you're still with me down here then you can check out the attached VoiceAttack package as well as the associated
VA-AHK.Integration GithHub repository. The README on GitHub provides a good overview of the project as well as details about how the functionality works at a high level. The profile included in the package contains example commands as well as the required supplemental files. I've provided thorough comments for every command action line in VoiceAttack and code line in the inline functions, so you should be able to follow along and learn how VA.AHK-Integration works and understand its capabilities. In short, the included commands demonstrate:
- Execution of raw AutoHotkey code
- Exeuction of an AutoHotkey script
- A wide range of functionality packed into a single VoiceAttack command and inline function
- A simple example showing the functionality spread across multiple VoiceAttack commands and inline functions
Please note that the VA-AHK.Integration package includes three libraries (.dll files) for use by the profile. Two of them are the 32 and 64-bit AutoHotkey libraries (both named
AutoHotkey.dll and obtained from HotKeyIt's
AutoHotkey_H Repository), and the third is the
VA.AutoHotkey.Interop.dll (modified from amazing-andrew's
AutoHotkey.Interop) for interfacing between C# and the AutoHotkey libraries. The commands automatically handle the moving of the
VA.AutoHotkey.Interop.dll into VoiceAttack's
Shared\
Assemblies folder, and
VA.AutoHotkey.Interop.dll will automatically locate and access the required
AutoHotkey.dll. All appropriate links, credits, and source code may be found via the VA-AHK.Integration
README on GitHub.
I've done a lot of testing in Windows 7 and 10 and everything appears to work as expected, though I don't have many AutoHotkey scripts available to further evaluate the functionality. If you have any questions or encounter any bugs or other unexpected behavior please let me know.
Support This and Future EffortsIf you find this profile useful, please consider buying me a cup of coffee. Thank you for your support!
I have been developing this project on and off for quite a few months, so I'm glad to finally be able to release it. Enjoy!