CSRLIN function

Purpose:

CSRLIN returns the number of the row in which the cursor is located.

Syntax:

RetVal = CSRLIN

Return Value:

  • Data type: INTEGER
    RetVal Number of the row in which the cursor is located.

Parameters:

  • None.

Remarks:

👉 CSRLIN works only in console mode programs.

POS function

Purpose:

POS returns the number of the column in which the cursor is located.

Syntax:

RetVal = POS

Return Value:

  • Data type: INTEGER
    RetVal Number of the column in which the cursor is located.

Parameters:

  • None.

Remarks:

👉 POS works only in console mode programs.

CURSORX function

Purpose:

CURSORX returns the number of the column in which the cursor is located.

Syntax:

RetVal = CURSORX

Return Value:

  • Data type: INTEGER
    RetVal Number of the column in which the cursor is located.

Parameters:

  • None.

Remarks:

👉 CURSORX works only in console mode programs.

CURSORY function

Purpose:

CURSORY returns the number of the row in which the cursor is located.

Syntax:

RetVal = CURSORY

Return Value:

  • Data type: INTEGER
    RetVal Number of the row in which the cursor is located.

Parameters:

  • None.

Remarks:

👉 CURSORY works only in console mode programs.

MOUSE_CX function

Purpose:

MOUSE_CX returns the current mouse X (horizontal, left-right) position, relative to the left edge of the client window.

Syntax:

RetVal = MOUSE_CX

Return Value:

  • Data type: INTEGER
    RetVal The current mouse X (horizontal, left-right) position, relative to the left edge of the client window.

Parameters:

  • None.

ExampleClick here to go to example.:

Click here to go to example.

MOUSE_CY function

Purpose:

MOUSE_CY returns the current mouse Y (vertical, top-bottom) position, relative to the top edge of the client window.

Syntax:

RetVal = MOUSE_CY

Return Value:

  • Data type: INTEGER
    RetVal The current mouse Y (vertical, top-bottom) position, relative to the top edge of the client window.

Parameters:

  • None.

ExampleClick here to go to example.:

Click here to go to example.

MOUSE_SX function

Purpose:

MOUSE_SX returns the current mouse X (horizontal, left-right) position, relative to the left edge of the active screen.

Syntax:

RetVal = MOUSE_SX

Return Value:

  • Data type: INTEGER
    RetVal The current mouse X (horizontal, left-right) position, relative to the left edge of the active screen.

Parameters:

  • None.

ExampleClick here to go to example.:

Click here to go to example.

MOUSE_SY function

Purpose:

MOUSE_SY returns the current mouse Y (vertical, top-bottom) position, relative to the top edge of the active screen.

Syntax:

RetVal = MOUSE_SY

Return Value:

  • Data type: INTEGER
    RetVal The current mouse Y (vertical, top-bottom) position, relative to the top edge of the active screen.

Parameters:

  • None.

ExampleHere is a simple console example::

Here is a simple console example:

DO
  SLEEP(20)
  LOCATE 1, 1, 0
  PRINT SPACE$(80)  ' Clear previous display 
  LOCATE 1, 1, 0
  PRINT "Client Mouse: "; MOUSE_CX; ", "; MOUSE_CY  ' Display client coordinates 
  LOCATE 2, 1, 0
  PRINT SPACE$(80)  ' Clear previous display 
  LOCATE 2, 1, 0
  PRINT "Screen Mouse: "; MOUSE_SX; ", "; MOUSE_SY  ' Display screen coordinates 
LOOP