AutoHotkey.dll or AutoHotkey.Interop with CLR

Ask for help, how to use AHK_H, etc.
burque505
Posts: 497
Joined: 22 Jan 2017, 19:37

AutoHotkey.dll or AutoHotkey.Interop with CLR

27 May 2018, 18:29

Hi all,
I'm look for some tips on how to get AutoHotkey.dll and/or AutoHotkey.Interop to work.
I've been able get the following code to run in LinqPad by adding a reference to AutoHotkey.Interop:

Code: [Select all] [Download] GeSHi © Codebox Plus

Dim Engine As New AutoHotkey.Interop.AutoHotkeyEngine
engine.ExecRaw("#InstallKeybdHook")
engine.ExecRaw("!^g::send Hello World")
engine.ExecRaw("msgbox, Move me out of the way`nI block threads")


However, if I try it in AHK script, like so (CLR_H.ahk is just CLR.ahk with references to built-in variables renamed - "null", that is, renamed to "nulo" - works fine if I'm not trying to call AutoHotkey.Interop or AutoHotkey.dll):

Code: [Select all] [Expand] [Download] GeSHi © Codebox Plus



I get the following error:
Spoiler


All help greatly appreciated!
Regards,
burque505

Return to “Ask For Help”

Who is online

Users browsing this forum: No registered users and 2 guests