RosettaCodeData/Task/Mouse-position/XTalk/mouse-position.xtalk

25 lines
873 B
Plaintext

-- Method 1:
-- this script in either the stack script or the card script to get position relative to the current stack window
on mouseMove pMouseH,pMouseV
put pMouseH,pMouse
end mouseMove
-- Method 2:
-- this script can go anywhere to get current position relative to the current stack window
put mouseLoc()
-- Method 3:
-- this script can go anywhere to get current position relative to the current stack window
put the mouseLoc
-- Method 4:
-- this script can go anywhere to get current position relative to the current window
put the mouseH &","& the mouseV
To get the mousePosition relative to the current screen instead of relative to the current stack window use the screenMouseLoc keyword
example results:
117,394 -- relative to current window
117,394 -- relative to current window
117,394 -- relative to current window
148,521 -- relative to current screen