User Guide

210 Chapter 14 Scripting the Visual Tools Object Model
GetImageSize
Syntax GetImageSize(const wsImageFile: WideString; var nHeight,
nWidth: Integer): WordBool;
Description Boolean. Retrieves the size of the passed image. Returns False on error.
Example
function Main() {
Var sFullImagePath;
Var Height;
Var Width;
sFullImagePath = "C:/Temp/photos/MyPic.jpg";
with (Application){
sFilePath = GetImageSize(sFullImagePath,Height,Width);
//Store the image parameters in Height and Width
}
}
GetImageWidth
Syntax GetImageWidth(const wsImageName: WideString):Integer;
Description Returns the width in pixels of the passed image. Returns 0 on error.
Example See the
GetImageHeight example.
GetMemoryStatus
Syntax GetMemoryStatus(iMemType);
Description Returns an integer value. On Windows 98, the values for 0, 1, and 2 are real numbers.
On Windows NT, since there is no corresponding API call to get resource levels, these
types always return the value 80%.
The following values are allowed:
0 - Available System resources (%)
1 - Available GDI resources (%)
2 - Available User resources (%)
3 - General memory used (%)
4 - Total physical memory (bytes)
5 - Available physical memory (bytes)
6 - Total swap file storage space (bytes)
7 - Available swap file storage space (bytes)
8 - Total virtual space (bytes)
9 - Available virtual space (bytes)