Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

inkey /m

Feb
16
0
Is there a way when using inkey /m to obtain the row/col where the click took place? In console character row/column, not screen pixel row/column.

If not, this would be a good feature add. Either extend inkey /m to return three items, so the @ascii conversion would return the mouse button, then the row number, then the column number. Or, to retain compatibility, add a /L (location) switch to use with /M to include the location in the result.

In the meantime, is there a way, when inkey /m detects a mouse click, to determine the character row/col relative to the console where the click occurred? Something via @winapi perhaps?
 
Is there a way when using inkey /m to obtain the row/col where the click took place? In console character row/column, not screen pixel row/column.

If not, this would be a good feature add. Either extend inkey /m to return three items, so the @ascii conversion would return the mouse button, then the row number, then the column number. Or, to retain compatibility, add a /L (location) switch to use with /M to include the location in the result.

In the meantime, is there a way, when inkey /m detects a mouse click, to determine the character row/col relative to the console where the click occurred? Something via @winapi perhaps?

No to the first, and a qualified maybe to the second. (There is no Windows API to return the console mouse position, but you can get the mouse position in screen coordinates & with a bit of number crunching get a row/column number.

I'll add the request for a row/column indicator for INKEY /M to the suggestion list for a future version.
 
Back
Top