I'm working on an @FGWIN function for the SYSUTILS plugin. It will return info about the foreground window.
One problem is that the foreground window could change between calls to @FGWIN. I could make a "static" version of it (either @FGWINS or @FGWIN[option[,s]]) which would **not** re-determine the foreground window. This would make it more difficult to use but I can't think of another way around the difficulty.
g:\projects\4sysutils\release> syshelp @fgwin @FGWIN[H(andle)|T(itle)|C(lass)|P(id)|M(odule)|PX(pos)|PY|SX(size)|SY]