System Variables
MSE Mouse State
  String System Variable
   
Contents String, current state of mouse.
   
Description This system variable contains a 32-byte string that describes the current state of the mouse. The following table shows the positions of all mouse attributes represented in the MSE string:
MSE String Description
(1,1) Current state:
$FF$ Mouse inactive/unavailable (e.g. Terminal, Unix/Linux console)
$00$ Mouse present - No buttons pushed
$01$ Left button down.
$02$ Right button down.
$03$ Both buttons down.
(2,1) Current mouse column in binary.
(3,1) Current mouse line in binary.
(4,2) Current mouse X (column) position in binary.
(6,2) Current mouse Y (line) position in binary.
(8,1) Absolute column #.
(9,1) Absolute row #.
(10,1) Standard character width.
(11,1) Standard character height.
(12,1) Width of Scroll box on standard scroll bar.
(13,1) Height of Scroll box on standard scrollbar.
(14,2) Mouse X (column) position relative to current window in binary.
(16,2) Mouse Y (line) position relative to current window in binary.
(18,2) Current control object with focus.
(20,2) Last control object with focus, relative to the current window.
(22,1) WindX/JavX revision level from $00$ to $FF$ ($FF$ for no thin-client).
(23,2) CTL value for context-sensitive help.
(25,2) Last control object to lose focus, relative to the current window.
(27,2) Maximum X (column) coordinates of the screen. (See Note)
(29,2) Maximum Y (line) coordinates of the screen. (See Note)
(31,1) Returns current window state. Values correspond to 'SHOW'( ) mnemonic.
DEC(MID(MSE,31,1)) Values
-1 for hidden
0 for minimized
1 for normal
2 for maximized
(32,1) Returns either W for WindX or J for JavX ($00$ for no thin client).


* Note * The Max/Min values represent the size of the useable desktop - not the actual screen size. The region occupied by the Windows Task bar is not included in the screen size.


Examples The following logic can be used to determine if WindX is running by checking its version number

IF MID(MSE,22,1)>$00$ AND MID(MSE,22,1)<$FF$ THEN %WDX$="[WDX]"

To get the maximum screen size in lines and columns:

0010 LET X$=MSE
0020 XCHAR=DEC($00$+X$(10,1))
0030 YCHAR=DEC($00$+X$(11,1))
0040 MAX_WIDE=INT(DEC(X$(27,2))/XCHAR)
0050 MAX_HIGH=INT(DEC(X$(29,2))/YCHAR)