Hotstrings Not Working - AHK_H and Autohotkey.Interop
Posted: 06 Jul 2017, 14:24
Hi Everyone -
I've been trying to port my code over to vb.net, and I while I got some functionality working with the Autohotkey.dll, I can't seem to get hotstrings to work.
Here's the little sample of a WinForms project. I have it loading the script on the button press. This is working:
However, when I try the following code it doesn't do the replacement.
Other information:
I'm using the dlls provided here https://github.com/amazing-andrew/AutoHotkey.Interop. I also tried replacing the Autohotkey.dll from a more recent build of AHK_H, but I got the same result.
I've been trying to port my code over to vb.net, and I while I got some functionality working with the Autohotkey.dll, I can't seem to get hotstrings to work.
Here's the little sample of a WinForms project. I have it loading the script on the button press. This is working:
Code: Select all
Imports AutoHotkey.Interop
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim ahk As AutoHotkeyEngine
ahk = AutoHotkeyEngine.Instance
Dim str As String = "F2::MsgBox Success"
ahk.ExecRaw(str)
End Sub
End Class
Code: Select all
Imports AutoHotkey.Interop
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim ahk As AutoHotkeyEngine
ahk = AutoHotkeyEngine.Instance
Dim str As String = "::btw::By the way"
ahk.ExecRaw(str)
End Sub
End Class
I'm using the dlls provided here https://github.com/amazing-andrew/AutoHotkey.Interop. I also tried replacing the Autohotkey.dll from a more recent build of AHK_H, but I got the same result.