Can anyone spot the bug in this AutoHotKey program, which I am running in Windows 7?
~i::iDown := A_TickCount
~i up::MsgBox, % "down at " iDown ", up at " A_TickCount ", down for " A_TickCount - iDown " ms."
In one run, when I held the "i" key for about 5 seconds, I got the result: down at 25700712, up at 25700743, down for 31 ms. Each time I run the program, I get a different (seemingly) random result, usually less than 100 ms. The result doesn't seem to correspond to how long I actually hold down the key. The subtraction part seems to be correct, so there must be something wrong with my implementation of A_TickCount.