Unable to load DLL AutoHotkey.dll VB.NET

0

im still new, i try to make cool stuff using vb.net project but got problem

Unable to load DLL 'AutoHotkey.dll

System.DllNotFoundException HResult=0x80131524 Message=Unable to load DLL 'AutoHotkey.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) Source=WindowsApp2 StackTrace: at WindowsApp2.Form1.ahktextdll(String script, String options, String param) at WindowsApp2.Form1.Button1_Click(Object sender, EventArgs e) in C:\Users\test\source\repos\WindowsApp2\WindowsApp2\Form1.vb:line 19 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel() at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine) at WindowsApp2.My.MyApplication.Main(String[] Args) in :line 81

my code :

Imports System.Runtime.InteropServices
Imports AutoHotkey.Interop
Imports AutoHotkey
Imports System.IO

Public Class Form1

' Dim ahk = New AutoHotkey
<DllImport("AutoHotkey.dll", CallingConvention:=CallingConvention.Cdecl, CharSet:=CharSet.Unicode)>
Private Shared Function ahktextdll(ByVal script As String, ByVal options As String, ByVal param As String) As Integer
End Function
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim n As Object = vbLf
    Dim script As Object = ("SetTitleMatchMode, 2" & (n & ("Run, calc.exe" & (n & ("Sleep, 1000" & (n & ("WinGet, rid , ,Rechner, , , " & (n & ("WinActivate, ahk_id %rid%" & (n & ("IfWinExist, ahk_id %rid%" & (n & ("{" & (n & (vbTab & "WinMove, ahk_id %rid%,, 0, 0, , " & (n & ("}" & (n & ("MouseClick, left,  105,  184" & (n & ("Sleep, 100" & (vbCrLf & ("MouseClick, left,  147,  215" & (n & ("Sleep, 100" & (vbCrLf & ("MouseClick, left,  110,  185" & (n & ("Sleep, 100" & (vbCrLf & ("MouseClick, left,  178,  263" & (n & ("Sleep, 100" & (n & "msgbox, 81"))))))))))))))))))))))))))))))))))
    ahktextdll(script, "", "")
    MsgBox("ende")

End Sub
End Class
vb.net
autohotkey
asked on Stack Overflow May 20, 2019 by Bego. • edited May 22, 2019 by Yane

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0