Link to home
Start Free TrialLog in
Avatar of Mark01
Mark01Flag for United States of America

asked on

Register AutoHotkey

I tried to run the code shown below as an administrator, but I got a “the module autohotkey.dll” error. An image of the error is attached. Any assistance to resolve the problem would be appreciated.

regsvr32.exe autohotkey.dll

Open in new window

User generated image
SOLUTION
Avatar of Michael Pfister
Michael Pfister
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Which version of AutoHotkey are you using for the AutoHotkey.dll module? I'm guessing AutoHotkey_H, in which case, read this:
https://hotkeyit.github.io/v2/docs/AutoHotkeyDll.htm

Btw, you may find this alternative approach helpful:
https://github.com/amazing-andrew/AutoHotkey.Interop

Regards, Joe
Avatar of Mark01

ASKER

@Michael Pfister: I searched the “c” drive for autohotkey.dll, but I did not find it.
@Gerwin Jansen: I did run the batch file as administrator.

I'll try Joe Winograd's suggestions next.
You have to copy the autohotkey.dll to the system before trying to register it.
> I searched the “c” drive for autohotkey.dll, but I did not find it.

A normal installation of AutoHotkey (as discussed in my article), does not install AutoHotkey.dll (it installs AutoHotkeyU64.exe, AutoHotkeyA32.exe, AutoHotkeyU32.exe, Ahk2Exe.exe, and other files in c:\Program Files\AutoHotkey\, but not AutoHotkey.dll). Regards, Joe
Avatar of Mark01

ASKER

@Michael Pfister: Where do I copy the autohotkey.dll from?

@Joe Winograd: I read your article but I did not find anything about the location of the autohotkey.dll. Your link to the article about the AutoHotkey module did mention the AutoHotkey COM Interface. Here is the text from that link:
AutoHotkey COM Interface: AutoHotkey.dll can be also loaded and manipulated using its COM Interface. Before using this Interface, AutoHotkey.dll needs to be registered.
> I read your article but I did not find anything about the location of the autohotkey.dll.

It's not in the article because it doesn't get installed as part of a standard AutoHotkey installation, as I said in my previous post. You need to get it as described in my post before that one.

Btw, what are you trying to accomplish that requires AutoHotkey.dll?
Avatar of Mark01

ASKER

I would like to use a VB.net program to run a script.

I read the article but I do not know how to get it.
Article:
https://hotkeyit.github.io/v2/docs/AutoHotkeyDll.htm#COMInterface
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark01

ASKER

I copied the file to C:\Program Files\AutoHotkey and I ran the following command: regsvr32 "C:\Program Files\AutoHotkey\AutoHotkey.dll"

Thank you, Joe, Michael and Gerwin.
You're welcome, Mark. Good luck with the project! Regards, Joe