Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Window or Not ?

When writing a general purpose routine for use on a macro key it can frequently be imperative to ascertain whether the user is currently on a window so that WINDOW_COMMON% variables can be used. I present below a workable, fast but inelegant solution. Please note that it only works if the status line is on.


0001      FUNCTION CHECK.WINDOW
0002  
0003         IN.WINDOW = 0; NEW = ""
0004         IF @STATUS.ON THEN
0005            CALL VIDEO.RW(1, 22, 6, 22, "R", IMAGE)
0006            FOR X = 1 TO 12 STEP 2
0007               NEW := IMAGE[X,1]
0008            NEXT
0009            IF NEW = "Window" THEN IN.WINDOW = 1
0010         END
0011      RETURN IN.WINDOW

(Volume 1, Issue 9, Page 11)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel