Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Mouse Position/coordinates

Status
Not open for further replies.

hermes1

Programmer
Oct 22, 2003
38
US
How do i get the the mouse x,y cordinates with perl and store it in a variable?
 
One way to do this is with Win32::GuiTest

Code:
use Win32::GuiTest qw(GetCursorPos);

($x,$y) = GetCursorPos();

print "$x $y";
 
Ok Thanks, but i think i probably don't have the Win32 module installed because i am kicking over to my error page and i did not see it listed in httpd.conf. Is there another way before i install that module.



complete script


#!/usr/bin/perl

##use CGI;
use Win32::GuiTest qw(GetCursorPos);

print "Content-type: text/html\n\n";
($x,$y) = GetCursorPos();
print "$x $y";

exit;
 
Ectually,

Could this be done in Pocket IE?

--Paul

I'm just being a lazy a$s, and I know I should set up a test, but just in case??

It's important in life to always strike a happy medium, so if you see someone with a crystal ball, and a smile on their face ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top