Hotstrings Not Working - AHK_H and Autohotkey.Interop

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Hotstrings Not Working - AHK_H and Autohotkey.Interop

Re: Hotstrings Not Working - AHK_H and Autohotkey.Interop

Post by HotKeyIt » 12 Aug 2017, 02:57

Try using #InstallKeybdHook in initial script.

Re: Hotstrings Not Working - AHK_H and Autohotkey.Interop

Post by avitiw » 12 Aug 2017, 02:49

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

Re: Hotstrings Not Working - AHK_H and Autohotkey.Interop

Post by HotKeyIt » 12 Jul 2017, 14:33

Try using LoadScript instead of ExecRaw!

Re: Hotstrings Not Working - AHK_H and Autohotkey.Interop

Post by The_Wildry_Dude » 12 Jul 2017, 12:43

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

Hotstrings Not Working - AHK_H and Autohotkey.Interop

Post by The_Wildry_Dude » 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]GeSHi © Codebox Plus

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]GeSHi © Codebox Plus

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.

Top