You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#include %A_LineFile%\..\CLR.ahk
|
|
|
|
|
|
|
|
class AutoHotInterception {
|
|
|
|
__New(cls := "Manager"){
|
|
|
|
dllFile := A_LineFile "\..\" "AutoHotInterception.dll"
|
|
|
|
if (!FileExist(dllFile)){
|
|
|
|
MsgBox % "Unable to find " dllFile ", exiting..."
|
|
|
|
ExitApp
|
|
|
|
}
|
|
|
|
|
|
|
|
asm := CLR_LoadLibrary(dllFile)
|
|
|
|
try {
|
|
|
|
this.Interception := asm.CreateInstance("AutoHotInterception." cls)
|
|
|
|
}
|
|
|
|
catch {
|
|
|
|
MsgBox Interception failed to load
|
|
|
|
ExitApp
|
|
|
|
}
|
|
|
|
if (this.Interception.OkCheck() != "OK"){
|
|
|
|
MsgBox Interception Test failed
|
|
|
|
ExitApp
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GetInstance(){
|
|
|
|
return this.Interception
|
|
|
|
}
|
|
|
|
|
|
|
|
GetDeviceList(){
|
|
|
|
DeviceList := {}
|
|
|
|
arr := this.Interception.GetDeviceList()
|
|
|
|
for v in arr {
|
|
|
|
DeviceList[v.id] := { ID: v.id, VID: v.vid, PID: v.pid, IsMouse: v.IsMouse }
|
|
|
|
}
|
|
|
|
return DeviceList
|
|
|
|
}
|
|
|
|
}
|