Hotstrings Not Working - AHK_H and Autohotkey.Interop

Post AHK_H specific scripts & libraries and discuss the usage and development of HotKeyIt's fork/branch
The_Wildry_Dude
Posts: 11
Joined: 17 Aug 2015, 17:15

Hotstrings Not Working - AHK_H and Autohotkey.Interop

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:

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
However, when I try the following code it doesn't do the replacement.

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
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.
The_Wildry_Dude
Posts: 11
Joined: 17 Aug 2015, 17:15

Re: Hotstrings Not Working - AHK_H and Autohotkey.Interop

12 Jul 2017, 12:43

Anyone? Any assistance that could be provided would be awesome :)
avitiw

Re: Hotstrings Not Working - AHK_H and Autohotkey.Interop

12 Aug 2017, 02:49

It works if I have a hotkey before defining hotstrings. Could someone tell how to resolve it?

Return to “AutoHotkey_H”

Who is online

Users browsing this forum: No registered users and 17 guests