|
|||||||
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) |
|||||||
| |||||||