#! /usr/bin/perl
#use strict;
use Win32::API;
Win32::API::Struct->typedef( LPPOINT => qw{
LONG x;
LONG y;
});
Win32::API->Import('user32', 'BOOL GetCursorPos(LPPOINT lpPoint)');
my $pt = Win32::API::Struct->new('LPPOINT');
while(1){
$pt->{x}=0;
$pt->{y}=0;
GetCursorPos($pt);
print "$pt->{x},$pt->{y} \n";
sleep(1);
};