Simply use a handler like the following:
on mouseUpInPicture wName, cloc
add (item 1 of loc of window wname) to item 1 of cloc
add (item 2 of loc of window wName) to item 2 of cloc
click at cloc
end mouseUpInPicture
So when you click on a picture window, this script will actually click on
whatever is directly underneath the picture.
The idea of the script is that the cloc parameter of the mouseUpInPicture
message refers to a location within the window generated by the Picture
command, and NOT to a coordinate on the card itself. However, if we tell
HyperCard to click someplace, it will always use the current card for
that. So all we have to do is add the LOC of the window (which is
expressed in terms of the card as a whole) to the CLOC of the window (which
is the area within the window that we clicked) to find the exact spot on
the card underneath the picture that is physically the same as the location
of the spot we clicked on the picture.
This article is adapted from the Claris Tech Info database.