You still don't make sense. Have you tried the OP's code? It works fine for me and (with a small tweak for counting) gives about 15,500 updates per second (not sure why the OP found that too slow actually).
use strict;
use warnings;
use Win32::GuiTest;
my $start = time;
my $times;
1 while time - 1 < $start;
while (time - 6 < $start) {
my ($x, $y) = Win32::GuiTest::GetCursorPos();
print "X is at $x, Y is at $y\n";
++$times;
}
print +($times / 5), "\n";
True laziness is hard work
|