Your conversion from C++ is faulty. There are no structure types (RECT) or pass-by-reference operators
in JScript. Also, you can't access structure members using "rc.left" or "rc.top". I suggest you learn more about Interop and DataBloc before attempting to do such conversions.
Anyway, to get you started, I tried to convert the snippet from that thread to JScript. I didn't test whether this actually works, but it shows the principles. Have a go with it and see if you can work out the rest.
js code:
var SM_CXSCREEN = 0;
var SM_CYSCREEN = 1;
function IsFullScreenAppRunning() {
var hWnd = Interop.Call('user32', 'GetForegroundWindow');
if(!hWnd)
return false;
if(!Interop.Call('user32', 'IsWindowVisible', hWnd) || Interop.Call('user32', 'IsIconic', hWnd) || !Interop.Call('user32', 'IsZoomed', hWnd))
return false;
var rc = Interop.Allocate(16);
if(!Interop.Call('user32', 'GetWindowRect', hWnd, rc))
return false;
var width = rc.ReadDWORD(8) - rc.ReadDWORD(0);
var height = rc.ReadDWORD(12) - rc.ReadDWORD(4);
return (width >= Interop.Call('user32', 'GetSystemMetrics', SM_CXSCREEN) && height >= Interop.Call('user32', 'GetSystemMetrics', SM_CYSCREEN));
}