Yes, Doug explained it well. Window-Eyes simply returns the value from
GetTickCount as a long which is explain on MSDN at:
http://msdn.microsoft.com/en-us/library/ms724408(VS.85).aspx
But you should be careful because VBScript has no sense of an unsigned
number. So this will become negative as Doug pointed out about 24 or 25
days from when the computer was first turned on and remain negative
until 49.7 days when it will wrap back to 0 and start all over. If you
take into account this can go negative then it won't be an issue. Or if
you don't want to deal with a negative tick count you can do something like.
value = TickCount And 2147483647
I'm sure all of you figured this out in your head but this is 7FFFFFFF
hex which turns off the high bit of the long forcing it to wrap back
around and become positive again. So instead of wrapping every 49.7
days this will wrap every 24.85 days but it will keep it positive.
Doug
Doug Lee wrote:
My experience with this property, though not specifically from
Window-Eyes, is that it is an unsigned long value that resets on
system boot and counts milliseconds. It therefore has a period of about
49.7 days. Warning: It is negative for half that time if considered
as a signed value, which can matter in mathematical checks and
calculations such as "if tc > 0" and "tc2-tc1."
On Sun, Nov 15, 2009 at 10:07:10PM -0700, Jeff Bishop wrote:
Hello,
Can we get a bit more information on this property? Is it constantly
incrementing or when does it reset? Can it be relied upon to
determine two points in time from two different keypresses?
Jeff