Skip to content

Commit e029e42

Browse files
committed
feat(ahk): show last error when failed to load
1 parent af1ff07 commit e029e42

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Binding.AHK1/IbInputSimulator.ahk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; IbInputSimulator (v1)
22
; Description: Enable AHK to send keystrokes by drivers.
33
; Author: Chaoses Ib
4-
; Version: 0.3
4+
; Version: 0.4
55
; Git: https://github.com/Chaoses-Ib/IbInputSimulator
66

77
IbSendInit(send_type := "AnyDriver", mode := 1, args*){
@@ -15,7 +15,7 @@ IbSendInit(send_type := "AnyDriver", mode := 1, args*){
1515
else if (!FileExist("IbInputSimulator.dll"))
1616
throw "SendLibLoadFailed: Please put IbInputSimulator.dll with your script file (or use AHK v2 instead, which can locate those DLLs that are put with the library files)"
1717
else
18-
throw "SendLibLoadFailed"
18+
throw "SendLibLoadFailed: " A_LastError
1919
}
2020

2121
if (send_type == "AnyDriver")

Binding.AHK2/IbInputSimulator.ahk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
; IbInputSimulator
22
; Description: Enable AHK to send keystrokes by drivers.
33
; Author: Chaoses Ib
4-
; Version: 0.3
4+
; Version: 0.4
55
; Git: https://github.com/Chaoses-Ib/IbInputSimulator
66

77
#DllLoad "*i IbInputSimulator.dll" ;DllCall("LoadLibrary") cannot locate DLL correctly
@@ -15,7 +15,7 @@ IbSendInit(send_type := "AnyDriver", mode := 1, args*){
1515
if (A_PtrSize == 4)
1616
throw "SendLibLoadFailed: Please use AutoHotkey x64"
1717
else
18-
throw "SendLibLoadFailed"
18+
throw "SendLibLoadFailed: " A_LastError
1919
}
2020

2121
if (send_type == "AnyDriver")

0 commit comments

Comments
 (0)