I don't know if I understood you right, but try this:
Code: Select all
var x, y, button, positionX, positionY := 0
loop
Mouse.Where (x, y, button)
locate (1, 1)
put "x: ", x, " y: ", y, " clicked: ", positionX, " ", positionY
if (button = 1) then
positionX := x
positionY := y
end if
end loop
[code]
If you wish for a middle and right click, use this:
[code]
Mouse.ButtonChoose ("multibutton")
var x, y, button, left, middle, right : int
loop
locate (1, 1)
Mouse.Where (x, y, button)
left := button mod 10
middle := (button - left) mod 100
right := button - middle - left
put "X:", x, " Y:", y
put "Left: ", left, " Middle: ", middle, " Right: ", right
end loop
[code]
[color=#888888][size=85]Archived topic from Iceteks, old topic ID:4098, old post ID:35025[/size][/color]