Hi!
I have what is probably a stupid newbie question. :) I'm trying to do
a very rapid proof-of-concept application in MacPerl, and found that
I needed a GUI. That has been going ok, but I desperately need to get
the x and y coordinates of the mouse after a click within a window.
Something along the lines of:
$win->sethook(click => sub {
my ($win, $pt) = @_;
x_loc = .....
y_loc = .....
if (x_loc > ...)
{
etc
}
});
So that I can do a quick test to see if a graphical button has been
pushed. However, because of what I am trying to do, it is essential
that I get the values as x and y, rather than just check to see if
the click lies within a previously defined rectangle (which was a
solution I found elsewhere). Something like the example MouseLogger.t
that shipped with MacPerl, but using the sethook method and giving
the coordinates within the window itself, not the screen as a whole.
Can anyone help?
Thanks heaps!
Adam.
--
---------------------------------------------------
Web Support Officer
Room 2.51, Law and Commerce Building
Faculty of Education, Humanities, Law and Theology
Flinders University
Phone (08) 8201-3628 (before 1:00pm)
Phone (08) 8201-3990 (after 1:00pm)