$getproperty
$getproperty
Returns the current settings of certain device or registry properties.
Syntax #1
Returns the current settings of certain desktop properties.
$getproperty(“desktop”,property)
Parameters
property | A character string or an expression that evaluates to a character string. Properties include MousePresent, ScreenColors (or ScreenColours), ScreenHeight, ScreenUnits, and ScreenWidth. |
Return Value
Character string or $null if property is not a recognized string.
Syntax #2
Returns the current settings of certain printer properties in the Windows environment.
$getproperty(“printer”,property)
Parameters
property | A character string, or an expression that evaluates to a character string. Properties include CharsPerLine, Color (or Colour), DeviceName, DisplayPrintDialog, DriverVersion, Duplex, FontName, FontSize, LinesPerPage, MonospacedFont, Orientation, PaperBin, PaperLength, PaperSize, PaperWidth, PrintQuality, Scale, TrueTypeOption, and YResolution. |
Return Value
Character string or $null if property is not a recognized string.
Comments
The string contains the current setting of property.
Syntax #3
Returns the current settings of the Zim variables stored in the Windows Registry.
$getproperty (registry_section,registry_variable)
Parameters
registry_section | A character string, or an expression that evaluates to a character string with the format “REG:[sectionname]” or “SERVREG:[sectionname]”. The sectionname can be ODBC, ZIM or a user-defined name. |
registry_variable | The registry variable being queried. |
Return Value
Character string or $null if the section or the variable is not present in the Registry.
Syntax #4
$GetProperty (“session“,
Parameters
session | The operating environment of one particular invocation of a Zim executable. |
config_setting | A valid configuration setting. |
Return Value
The return value is the current value of the specified config_setting.
Syntax #5
$GetProperty (“OleVerbList“, FileOrClassName)
Parameters
OleVerbList | The list of verb names supported by an OLE object. |
FileOrClassName | A valid OLE file or classname. |
Return Value
The return value is the list of supported verbnames of a file or OLE class. Semicolons separate the verbs in the returned list.
Examples
>out $getproperty (“OleVerbList”, “ztizim.bmp”)
Edit;Open
In the above command, the OleVerbList associated with a .bmp file is “Edit;Open” which means that there are two available verbs: Edit and Open.
let vFontSize = $getproperty (“printer”, “fontsize”)
In the above command, vFontSize can be a character or number variable. (The software converts the character string returned by $getproperty to a number, if required.)
let vODBCVersion = $getproperty (“REG:[ODBC]”, “VERSION”)
Gets the version of the installed Zim ODBC Driver.
See Also