The code:
Code: Select all
Loop, Reg, HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\kbdhid\Enum, KV
{
if (A_LoopRegType = "REG_SZ")
{
RegRead, value
MsgBox, , , %value%, 100
if (%value% ~= "00001124-0000-1000-8000-00805f9b34fb")
{
MsgBox, , Title, Text, 5
KeyboardConnected := true
}
}
}
HID\{00001124-0000-1000-8000-00805f9b34fb}_VID&0002046d_PID&b342&Col01\8&3156b294&0&0000
The MsgBox line works, but the if (%value% ~= "00001124-0000-1000-8000-00805f9b34fb") line doesn't.
Is there anyway to remove the invalid characters so that AHK can use the variable?