Mouse position: Difference between revisions

m (moved "omit from" reasons from comments to the template tag)
Line 180:
WRITE(Messagebox, Name) X, Y
END</lang>
 
=={{header|Icon}} and {{header|Unicon}}==
In Icon/Unicon the mouse position may be tracked between button presses for any window created by the program. The following code snippet taken from the Icon Graphics Book on page 197-198 shows how to track the mouse.
<lang Icon>until *Pending() > 0 & Event() == "q" do { # loop until there is something to do
px := WAttrib("pointerx")
py := WAttrib("pointery")
# do whatever is needed
WDelay(5) # wait and share processor
</lang>
 
 
=={{header|Java}}==
Anonymous user