'---------------------------------------------------------------------------------------- 'SCRIPT: avu-WinHowBig 'PROJECT: gavos.apr, avcsus 'DATE: 10-25-95 'AUTHOR: John Ganter, Sandia National Labs, jganter@sandia.gov 'DESC: reports size of AV application, and a selected Window size and ' location. Most X windows managers provide readouts of size and ' position whenever a window is manipulated, but Windows does not. ' 'CALLED BY: standalone, a Button, or a Tool 'CALL AS: av.Run("avu-WinHowBig",) 'ACCEPTS: objWindow or last active Window 'RETURNS: MsgBox with information 'EXPECTS: 'CALLS TO: '---------------------------------------------------------------------------------------- 'use argument if present, otherwise get Window for the active document if (SELF = nil) then winActive = av.GetActiveDoc.GetWin else winActive = SELF end 'size of the video display ptExtent = System.ReturnScreenSizePixels intWi = ptExtent.GetX intHi = ptExtent.GetY strDisp = "Display: " + intWi.AsString ++ intHi.AsString 'size of the AV application ptExtent = av.ReturnExtent intWi = ptExtent.GetX intHi = ptExtent.GetY strApp = "App: " + intWi.AsString ++ intHi.AsString 'location of the selected window ptOrigin = winActive.ReturnOrigin intULx = ptOrigin.GetX intULy = ptOrigin.GetY strLoc = "Window loc (ULx/ULy): " + intULx.AsString ++ intULy.AsString 'size of the selected window ptExtent = winActive.ReturnExtent intWinWi = ptExtent.GetX intWinHi = ptExtent.GetY strSiz = "Window size (wi/hi): " + intWinWi.AsString ++ intWinHi.AsString 'make report strReport = strLoc + NL + strSiz + NL + strApp ++ strDisp MsgBox.Info(strReport,"Dimensions") '----end of script---------------------------------------------------