Can I get the current mouse position?
Posted: 13 Apr 2018 03:25
Can I get the current mouse position?
Forum for XYplorer Users and Developers
https://www.xyplorer.com/xyfc/
Code: Select all
::screen;Code: Select all
$clip = <clipboard>;
run "<path to get mouse position.exe>", "%TEMP%", 2, 0;
$x = gettoken(<clipboard>, 1);
$y = gettoken(<clipboard>, 2);
copytext $clip;
status "X: $x, Y: $y";
Code: Select all
+ SC get got a new named argument "cursorpos" to return the mouse cursor
position on screen.
Syntax: get("cursorpos", param1)
param1:
x,X: X position
y,Y: Y position
[else]: Separator between X and Y position
If empty it defaults to ";"
return: Mouse cursor position on screen.
Examples:
echo get("cursorpos"); //425;237
echo get("cursorpos", ","); //339,488
echo get("cursorpos", ", "); //339, 488
echo get("cursorpos", "X"); //1018
echo get("cursorpos", "y"); //414