From ce625778b623ede0bd235db29f32c407d81dacd6 Mon Sep 17 00:00:00 2001 From: Clive Galway Date: Tue, 21 Mar 2023 13:11:34 +0000 Subject: [PATCH] Fix GetDeviceId --- v2/Lib/AutoHotInterception.ahk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/v2/Lib/AutoHotInterception.ahk b/v2/Lib/AutoHotInterception.ahk index 8883b57..13f502a 100644 --- a/v2/Lib/AutoHotInterception.ahk +++ b/v2/Lib/AutoHotInterception.ahk @@ -120,7 +120,7 @@ class AutoHotInterception { ; --------------- Querying ------------------------ GetDeviceId(IsMouse, VID, PID, instance := 1) { - static devType := { 0: "Keyboard", 1: "Mouse" } + static devType := Map(0, "Keyboard", 1, "Mouse") dev := this.Instance.GetDeviceId(IsMouse, VID, PID, instance) if (dev == 0) { MsgBox("Could not get " devType[isMouse] " with VID " VID ", PID " PID ", Instance " instance) @@ -130,7 +130,7 @@ class AutoHotInterception { } GetDeviceIdFromHandle(isMouse, handle, instance := 1) { - static devType := { 0: "Keyboard", 1: "Mouse" } + static devType := Map(0, "Keyboard", 1, "Mouse") dev := this.Instance.GetDeviceIdFromHandle(IsMouse, handle, instance) if (dev == 0) { MsgBox("Could not get " devType[isMouse] " with Handle " handle ", Instance " instance)