Skip to content

Commit 0672abf

Browse files
committed
Ahk: Fix script including and send lib loading (v1);
Improve documentation
1 parent 34d9622 commit 0672abf

15 files changed

Lines changed: 35 additions & 13 deletions

AhkDll.Ahk/v1/IbAhkSend.ahk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ IbSendInit(send_type := "AnyDriver", mode := 1, args*){
88
workding_dir := A_WorkingDir
99
SetWorkingDir, %A_ScriptDir%
1010

11-
static hModule := DllCall("LoadLibrary", "Str", "IbAhkSend.dll", "Ptr")
11+
static hModule := DllCall("LoadLibrary", "Str", A_ScriptDir "\IbAhkSend.dll", "Ptr")
1212
if (hModule == 0){
1313
if (A_PtrSize == 4)
1414
throw "SendLibLoadFailed: Please use AutoHotkey x64"

AhkDll.Ahk/v1/test/KeyHistory.ahk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
#InstallMouseHook
33
KeyHistory
44

5+
; If a key is sent by the driver, it should not have an "i" in the Type field.
6+
57
F4::ExitApp

AhkDll.Ahk/v1/test/mode 0.ahk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; Mode 0 (v1)
22
; Run Notepad, type "Hello world!" and then select all text by mouse.
33

4+
#Include %A_ScriptDir%
45
#Include ..\IbAhkSend.ahk
56

67
IbSendInit("AnyDriver", 0)
@@ -10,7 +11,7 @@ WinWaitActive, ahk_class #32770
1011
IbSend("notepad`n")
1112

1213
WinWaitActive, ahk_exe notepad.exe
13-
IbSend("Hello world+1")
14+
IbSend("Hello world{!}")
1415
Sleep 100
1516
CoordMode, Mouse, Client
1617
IbSend("{Click 5, 5, down}{click 150, 50, up}")

AhkDll.Ahk/v1/test/mode 1.ahk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; Mode 1 (v1)
22
; Run Notepad, type "Hello world!" and then select all text by mouse.
33

4+
#Include %A_ScriptDir%
45
#Include ..\IbAhkSend.ahk
56

67
IbSendInit()
@@ -10,7 +11,7 @@ WinWaitActive, ahk_class #32770
1011
Send notepad`n
1112

1213
WinWaitActive, ahk_exe notepad.exe
13-
Send Hello world+1
14+
Send Hello world{!}
1415
Sleep 100
1516
CoordMode, Mouse, Client
1617
MouseClickDrag, Left, 5, 5, 150, 50

AhkDll.Ahk/v1/test/mode ahk.ahk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WinWaitActive, ahk_class #32770
55
Send notepad`n
66

77
WinWaitActive, ahk_exe notepad.exe
8-
Send Hello world+1
8+
Send Hello world{!}
99
Sleep 100
1010
CoordMode, Mouse, Client
1111
MouseClickDrag, Left, 5, 5, 150, 50

AhkDll.Ahk/v1/test/type DD.ahk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Include %A_ScriptDir%
12
#Include ..\IbAhkSend.ahk
23
IbSendInit("DD") ;or IbSendInit("DD", 1, "C:\SomeDir\DD64.dll")
34
#include mode ahk.ahk
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Include %A_ScriptDir%
12
#Include ..\IbAhkSend.ahk
23
IbSendInit("Logitech")
34
#include mode ahk.ahk

AhkDll.Ahk/v1/test/type Razer.ahk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Include %A_ScriptDir%
12
#Include ..\IbAhkSend.ahk
23
IbSendInit("Razer")
34
#include mode ahk.ahk
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#Include %A_ScriptDir%
12
#Include ..\IbAhkSend.ahk
23
IbSendInit("SendInput")
34
#include mode ahk.ahk

AhkDll.Ahk/v2/test/KeyHistory.ahk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
#InstallMouseHook
33
KeyHistory()
44

5+
; If a key is sent by the driver, it should not have an "i" in the Type field.
6+
57
F4::ExitApp()

0 commit comments

Comments
 (0)