Sunteți pe pagina 1din 129

GROUPS AND CLASSES

IN
SILK TEST 7.5

Jagan Mohan Julooru 1


The following document discusses about different types of Groups and
Classes in Silk Test.

Note: All functions related to Groups and All methods related classes
are discussed.

Jagan Mohan Julooru 2


#***********************************************************************
Group : Application state control functions

Function : sAppState = GetAppState (sFunctionName)


Returns : sAppState : Name of the application state function on which
sFunctionName is based. STRING.
Parameter : sFunctionName : Name of the application state or testcase
function. STRING.
Notes : Returns the name of the application state function on which the specified
application state or testcase function is based.Function : SetAppState ()
Notes : Calls the testcase's application state function.

Function : lsAppState = GetAppStateList (sFunctionName)


Returns : lsAppState : List of application states on which sFunctionName is
based, in the order they would be called. LIST OF STRING.
Parameter : sFunctionName : Name of the application state or testcase
function. STRING.
Notes : Returns the names of all the application state functions on which the
specified application state or testcase function is based.

Function : SetAppState ()
Notes : Calls the testcase's application state function.

Function : Browser = SetBrowserType (gBrowserType [, hMachine])


Returns : Browser : The previous setting.
Parameter : gBrowserType : The Browser type the agent should use.
Parameter : hMachine : Machine on which to use this browser type.
Notes : Set Browser type that will be used for browser-dependent commands.
Unlike the GUI type, this is never determined by the agent; it will be NULL unless you
set it, via Runtime Options, SetBrowserType, or SetDefaultBrowserType.

Jagan Mohan Julooru 3


Function : Browser = SetDefaultBrowserType (gBrowserType)
Returns : Browser : The previous setting.
Parameter : gBrowserType : The browser type that will be used on new
connections.
Notes : This is equivalent to setting the browser type in Runtime Options.

Function : SetGuiType (gGuiType [, hMachine])


Parameter : gGuiType : The GUI the agent should use.
Parameter : hMachine : Machine on which to use this substitute GUI.
Notes : Set GUI the agent should use for GUI-dependent script commands.

Function : SetBaseState ()
Notes : Calls the testcase's base state function.

#***********************************************************************

Group : Array functions

Function : iPos = ArrayFind (aArray, aElem, iMaxIndex)


Returns : iPos : The returned position of the element.
Parameter : aArray = myArray : An array of any type.
Parameter : aElem = "myElem" : The element to find (can be any type).
Parameter : iMaxIndex = 5 : The number of elements to search.
Notes : Finds the position of an element in an array.

Function : ArrayResize (aArray, iNewSize [, iDim])


Parameter : aArray = myArray : An array of any type. (inout)
Parameter : iNewSize = 5 : The new number of elements for the array.
Parameter : iDim : The dimension to resize. (Optional)
Notes : Changes the number of elements in an array.

Jagan Mohan Julooru 4


Function : iNumElems = ArraySize (aArray [, iDim])
Returnster : iDim : The dimension to measure. (Optional)
Notes : Returns the number of elements in an array.

Function : ArraySort (aArray [, iMaxIndex])


Parameter : aArray = myArray : An array of any type. (inout)
Parameter : iMaxIndex : The index of the last element to sort. (Optional)
Notes : Sorts the elements in an array.

#***********************************************************************

Group : Conversion functions

Function : iCode = Asc (sString)


Returns : iCode : The returned ASCII code.
Parameter : sString = "myString" : The string to process.
Notes : Returns the ASCII code for the first character in a string.

Function : sChar = Chr (iInt)


Returns : sChar : The returned character.
Parameter : iInt = 65 : The ASCII code to process.
Notes : Returns the character that corresponds to an ASCII code.

Function : sConverted = Lower (sToConvert)


Returns : sConverted : The converted string.
Parameter : sToConvert = "MYSTRING" : The string to convert.
Notes : Converts uppercase characters to lowercase.

Function : sString = PrintfToString (sFormat, vaArgs)


Returns : sString : The formatted string.
Parameter : sFormat = "%s%d" : The format to use.

Jagan Mohan Julooru 5


Parameter : vaArgs = "abc", 123 : Any number of expressions of any type.
Notes : Returns a formatted expression as a string.

Function : sChar = Str (nNum [, iWidth , iDec])


Returns : sChar : The returned string.
Parameter : nNum = 5 : The number to convert.
Parameter : iWidth : The length for the returned string. (Optional)
Parameter : iDec : The number of decimal places to include. (Optional)
Notes : Converts a number to a character string.

Function : sConverted = Upper (sToConvert)


Returns : sConverted : The converted string.
Parameter : sToConvert = "mystring" : The string to convert.
Notes : Converts lowercase characters to uppercase.

Function : nNum = Val (sToConvert)


Returns : nNum : The returned number.
Parameter : sToConvert = "12345" : The string to convert.
Notes : Converts a string to a number.

#***********************************************************************

Group : Database functions

Function : hstmnt = DB_ColumnPrivileges(hdbc,catalog-name,schema-


name,table-name,column-name)
Returns : hstmnt : The statement handle containing the result set.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE
Parameter : catalog-name : Catalog name. STRING
Parameter : schema-name : Schema name. STRING

Jagan Mohan Julooru 6


Parameter : table-name : Table name. STRING
Parameter : column-name : String search pattern for column names.
STRING
Notes : Retrieves the column privileges for the specified table column(s).

Function : hstmnt = DB_Columns (hdbc, catalog-name, schema-name, table-


name, column-name)
Returns : hstmnt : The statement handle containing the result set.
Parameter : catalog-name : Catalog name. STRING
Parameter : schema-name : Schema name. STRING
Parameter : table-name : Table name. STRING
Parameter : column-name : String search pattern for column names. STRING
Notes : The list of column names in specified tables.

Function : hdbc = DB_Connect (con_string)


Returns : hdbc : The handle to a database connection. HDATABASE
Parameter : con_string : A string identifying the database connection. STRING
Notes : Connects to a database system so you can execute SQL statements.

Function : DB_Disconnect (hdbc)


Parameter : hdbc: The database handle returned by DB_Connect. HDATABASE
Notes : Disconnects from the database system and releases all resources.

Function : hstmnt = DB_ExecuteSQL (hdbc, sql_stmnt)


Returns : hstmnt : The returned handle to the executed SQL statement.
HSQL
Parameter : hdbc: The database handle returned by DB_Connect.
HDATABASE
Parameter : sql_stmnt : The SQL statement to be executed, e.g., "Update".
STRING
Notes : Sends an SQL statement to the specified database for execution.

Jagan Mohan Julooru 7


Function : status = DB_FetchNext (hstmnt, var[, var, ])
Returns : status : Returns FALSE when there are no more rows.
Parameter : hstmnt : SQL statement handle returned by DB_ExecuteSQL.
HSQL
Parameter : var, ... : Variables for the first "n" columns in the DB row. out
ANYTYPE
Notes : Retrieves the next row of the database or the first "n" columns of the row.

Function : status = DB_FetchPrev (hstmnt, var[, var, ])


Returns : status : Returns FALSE when there is no previous row.
Parameter : hstmnt : SQL statement handle returned by DB_ExecuteSQL.
HSQL
Parameter : var, ... : Variables for the first "n" columns in the DB row. out
ANYTYPE
Notes : Retrieves the previous row of the database or the first "n" columns of the
row.

Function : DB_FinishSQL (hstmnt)


Parameter : hstmnt : SQL statement handle returned by DB_ExecuteSQL.
HSQL
Notes : Removes the result of the SQL statement and releases the statement handle.

Function : hstmnt = DB_ForeignKeys (hdbc, pcatalog-name, fschema-name,


table-name, column-name)
Returns : hstmnt : The statement handle containing the result set.
Parameter : pcatalog-name : Primary key table catalog name. STRING.
Parameter : pschema-name : Primary key table schema name. STRING.
Parameter : ptable-name : Primary key table name. STRING.
Parameter : fcatalog-name : Foreign key catalog name. STRING.
Parameter : fschema-name : Foreign key catalog name. STRING.

Jagan Mohan Julooru 8


Parameter : ftable-name : Foreign key table name. STRING.
Notes : Retrieves either a list of foreign keys in the specified table (columns in the
specified table that refer to primary keys in other tables) or a list of foreign keys in other
tables that refer to the primary key in the specified table.

Function : hstmnt = DB_GetConnectAttr (hdbc, attr-id, new-attr-value)


Returns : status : Returns TRUE if the get operation was successful.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.
Parameter : attr-id : The attribute identifier to set. INTEGER.
Parameter : new-attr-value : The string or integer value to set. ANYTYPE.
Notes : Gets the value of an ODBC Driver connection attribute.

Function : hstmnt = DB_PrimaryKeys (hdbc, catalog-name, schema-name,


table-name)
Returns : hstmnt : The statement handle containing the result set.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.
Parameter : catalog-name : Catalog name. STRING.
Parameter : schema-name : Schema name. STRING.
Parameter : table-name : Table name. STRING.
Notes : Returns the column names that make up the table's primary key.

Function : hstmnt = DB_ProcedureColumns (hdbc, catalog-name, schema-


name, proc-name, column-name)
Returns : hstmnt : The statement handle containing the result set.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.
Parameter : catalog-name : Procedure catalog name. STRING.
Parameter : schema-name : String search pattern for procedure schema
names. STRING.

Jagan Mohan Julooru 9


Parameter : proc-name : String search pattern for procedure names. STRING.
Parameter : column-name : String search pattern for column names.
STRING.
Notes : Retrieves the list of input and output parameters, as well as the columns that
make up the result set for the specified procedures.

Function : hstmnt = DB_Procedures (hdbc, catalog-name, schema-name,


proc-name)
Returns : hstmnt : The statement handle containing the result set.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.
Parameter : catalog-name : Procedure catalog name. STRING.
Parameter : schema-name : String search pattern for procedure schema
names. STRING.
Parameter : proc-name : String search pattern for procedure names. STRING.
Notes : Retrieves the list of procedure names stored in a specific data source.

Function : hstmnt = DB_SetConnectAttr (hdbc, attr-id, new-attr-value)


Returns : status : Returns TRUE if the set operation was successful.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.
Parameter : attr-id : The attribute identifier to set. INTEGER.
Parameter : new-attr-value : The string or integer value to set. ANYTYPE.
Notes : Sets the value of an ODBC Driver connection attribute.

Function : hstmnt = DB_SpecialColumns(hdbc,type,catalog-name,schema-


name,table-name,scope,nullable)
Returns : hstmnt : Returns The statement handle containing the result set.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.

Jagan Mohan Julooru 10


Parameter : type : Type of column to return. Either "1" for SQL_BEST_ROWID
or "2" for SQL_ROWVER. STRING.
Parameter : catalog-name : Catalog name for the table. STRING.
Parameter : schema-name : Schema name for the table. STRING.
Parameter : table-name : Table name. STRING.
Parameter : scope : Minimum required scope of the rowid. Either "0" for
SQL_SCOPE_CURROW, "1" for SQL_SCOPE_TRANSACTION, or "2" for
SQL_SCOPE_SESSION. STRING.
Parameter : nullable : Determines whether to return special columns that can
have a NULL value. Either "0" for SQL_NONULLS or "1" for SQL_NULLABLE.
STRING.
Notes : Retrieves the optimal set of columns that uniquely identifies a row in the
specified table and the columns that are automatically updated when a value in the row is
updated by a transaction.

Function : hstmnt = DB_Statistics (hdbc, catalog-name, schema-name, table-


name, unique, reserved)
Returns : hstmnt : The statement handle containing the result set.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.
Parameter : catalog-name : Catalog name. STRING.
Parameter : schema-name : Schema name. STRING.
Parameter : table-name : Table name. STRING.
Parameter : unique : Type of index. Either "0" for SQL_INDEX_UNIQUE or
"1" for " SQL_INDEX_ALL. STRING.
Parameter : reserved : Indicates the importance of the Cardinality and Pages
columns in the result set. Either "0" for SQL_QUICK or "1" for " SQL_ENSURE.
STRING.
Notes : Retrieves a list of statistics about a single table and the indexes associated
with it.

Jagan Mohan Julooru 11


Function : hstmnt = DB_TablePrivileges (hdbc, catalog-name, schema-name,
table-name)
Returns : hstmnt : The statement handle containing the result set.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.
Parameter : catalog-name : Catalog name. STRING.
Parameter : schema-name : String search pattern for schema name. STRING.
Parameter : table-name : String search pattern for table name. STRING.
Notes : Retrieves a list of tables and the privileges associated with each one.

Function : hstmnt = DB_Tables (hdbc, catalog-name, schema-name, table-


name, table-type)
Returns : hstmnt : The statement handle containing the result set.
Parameter : hdbc: The handle to a database as returned by DB_Connect.
HDATABASE.
Parameter : catalog-name : Catalog name. STRING.
Parameter : schema-name : String search pattern for schema names.
STRING.
Parameter : table-name : Table name. STRING.
Parameter : table-type : List of table types to match, for example, "table" or
"view". STRING.
Notes : Retrieves the list of table, catalog, or schema names, and table types, stored
in a specific data source.

#***********************************************************************

Group : Data type functions

Function : lsFields = FieldsOfRecord (dRecordType)


Returns : lsFields : A list of fields of the specified record type.
Parameter : dRecordType = myRecord : The name of the record type to check.

Jagan Mohan Julooru 12


Notes : Returns the names of the fields in a record.

Function : bTest = IsArray (aExpression)


Returns : bTest : TRUE if it is an array, otherwise FALSE.
Parameter : aExpression = myExp : An expression of any type.
Notes : Tests whether an expression is an array.

Function : bTest = IsList (aExpression)


Returns : bTest : TRUE if it is a list, otherwise FALSE.
Parameter : aExpression = myExp : An expression of any type.
Notes : Tests whether an expression is a list.

Function : bTest = IsNull (aAddr)


Returns : bTest : TRUE if value is NULL, otherwise FALSE.
Parameter : aAddr : A variable, list element, or array element of any type.
Notes : Tests whether the value at the specified address is NULL.

Function : bTest = IsSet (aVar)


Returns : bTest : TRUE if assigned, otherwise FALSE.
Parameter : aVar = myVar : A variable of any type.
Notes : Tests whether a variable has been assigned an initial value.

Function : Type = TypeOf (aExpression)


Returns : Type : The data type of the expression.
Parameter : aExpression = myExp : The expression to evaluate.
Notes : Returns the data type of an expression.

Function : laValues = ValuesOfEnum (Enum)


Returns : laValues : A list with the values (of any type).
Parameter : Enum = myEnum : The enumeration to return values for.
Notes : Returns the list of values for an enumerated type.

Jagan Mohan Julooru 13


#***********************************************************************

Group : Date and Time functions

Function : NewDT = AddDateTime (DateTime[, iDays, iHours, iMins, iSecs,


iMs])
Returns : NewDT : Sum of DateTime and specified time values.
DATETIME
Parameter : DateTime : The original DATETIME value.
Parameter : iDays : A days value to add to DateTime. (Optional)
Parameter : iHours : An hours value to add to DateTime. (Optional)
Parameter : iMins : A minutes value to add to DateTime. (Optional)
Parameter : iSecs : A seconds value to add to DateTime. (Optional)
Parameter : iMs : A microseconds value to add to DateTime. (Optional)
Notes : Adds time to a DATETIME and returns the new DATETIME.

Function : sDate = DateStr ()


Returns : sDate : The current date.
Notes : Returns the current date as a string.

Function : iDays = DiffDateTime (DT1, DT2[, iHours, iMins, iSecs, iMs])


Returns : iDays : Difference in days between DT1 and DT2.
Parameter : DT1 : DATETIME value from which DT2 is subtracted.
Parameter : DT2 : DATETIME value to be subtracted from DT1.
Parameter : iHours : Hours component of DT1 minus DT2. out (Optional)
Parameter : iMins : Minutes component of DT1 minus DT2. out (Optional)
Parameter : iSecs : Seconds component of DT1 minus DT2. out (Optional)
Parameter : iMs : Microseconds component of DT1 minus DT2. out (Optional)
Notes : Calculates the difference between two DATETIME values.

Jagan Mohan Julooru 14


Function : sTime = ElapsedStr ()
Returns : sTime : The elapsed time.
Notes : Returns the elapsed time of the currently executing script.

Function : sDateTime = FormatDateTime (DateTime[, sFormat])


Returns : sDateTime : The DATETIME value converted to a formatted
STRING.
Parameter : DateTime : A DATETIME value to be formatted.
Parameter : sFormat : The formatting string; if omitted, the format defaults.
(Optional)
Notes : Formats a DATETIME value, using a format string, and returns a string.

Function : DateTime = GetDateTime ()


Returns : DateTime : The current date and time returned as a DATETIME
value.
Notes : Gets current date and time from the host system.

Function : iValue = GetDateTimePart (DateTime, PartName)


Returns : iValue : The value of the DATETIME field specified by
PartName.
Parameter : DateTime : The DATETIME value from which you want a field.
Parameter : PartName : A constant from the enumerated data type
DATETIMEPART.
Notes : Returns the integer value of the specified field of a DATETIME value.

Function : DT = MakeDateTime (iYear, iMonth, iDay[, iHour, iMin, iSec,


iMs])
Returns : DT : The generated DATETIME value.
Parameter : iYear : The full year value (century included).
Parameter : iMonth : The month (1-12).
Parameter : iDay: The day (1-31).

Jagan Mohan Julooru 15


Parameter : iHour : The hour in 24-hour format (0-23). (Optional)
Parameter : iMin: The minute (0-59). (Optional)
Parameter : iSec : The second (0-59). (Optional)
Parameter : iMs : The microsecond (0-9999999). (Optional)
Notes : Generates and returns a DATETIME value constructed from specified
parameters.

Function : Time = MakeTime (iHour[, iMin, iSec, iMs])


Returns : Time : The generated TIME value.
Parameter : iHour : The hour in 24-hour format (0-23).
Parameter : iMin: The minute (0-59). (Optional)
Parameter : iSec : The second (0-59). (Optional)
Parameter : iMs : The microsecond (0-9999999). (Optional)
Notes : Generates and returns a TIME value constructed from specified parameters.

Function : sTime = TimeStr ()


Returns : sTime : The current time.
Notes : Returns the current time as a string.

Function : Sleep (nSeconds)


Parameter : nSeconds = 2 : The number of seconds to pause.
Notes : Pauses execution of the script.

#***********************************************************************

Group : Distributed functions

Function : hMachine = Connect (sMachine)


Returns : hMachine : A handle (of type HMACHINE) to the machine.
Parameter : sMachine = "myMachine" : The name of the machine to connect to.
Notes : Establishes a connection to a machine.

Jagan Mohan Julooru 16


Function : Disconnect (hMachine)
Parameter : hMachine = myHandle : A handle (of type HMACHINE) to the
machine.
Notes : Disconnects a machine.

Function : DisconnectAll ()
Notes : Disconnects all currently connected machines.

Function : lhMachines = GetConnected ()


Returns : lhMachines : The returned list of machine handles. LIST OF
HMACHINE
Notes : Gets the list of machine handles for all connected machines.

Function : hMachine = GetMachine ()


Returns : hMachine = myHandle : A handle (of type HMACHINE) to the
machine.
Notes : Returns a handle to the current machine.

Function : aData = GetMachineData (hMachine, sName)


Returns : aData : The data that is associated with this machine.
ANYTYPE
Parameter : hMachine : A handle (of type HMACHINE) to the machine.
Parameter : sName : A string that is the name of the data.
Notes : Gets the named data associated with the specified machine.

Function : sName = GetMachineName ([hMachine])


Returns : sName : A string that is the name of the machine.
Parameter : hMachine : A handle (of type HMACHINE) to the machine.
(Optional)
Notes : Returns the name of the specified machine or the current machine.

Jagan Mohan Julooru 17


Function : bTest = IsConnected ([sName])
Returns : bTest : TRUE if specified machine (or any machine) is
connected.
Parameter : sName : Machine name; if omitted, tests for current machine.
(Optional)
Notes : Tests whether specified machine (or any machine) is connected.

Function : SetMachine (Machine)


Parameter : Machine = myHandle : A handle (of type HMACHINE) to the
machine or a string representing the machine name.
Notes : Makes a machine the current machine.

Function : SetMachineData (hMachine, sName, aData)


Parameter : hMachine : A handle (of type HMACHINE) to the machine.
Parameter : sName : The name to assign to the data. STRING
Parameter : aData : The data to be associated with this machine. ANYTYPE
Notes : Sets the named data to a value and associates it with a machine.

Function : SetMultiAppStates ()
Notes : Calls the application state function associated with each connected machine.

Function : SetMultiBaseStates ()
Notes : Calls the base state function associated with each connected machine.

Function : SetUpMachine (sMachine[, wMainWin, sAppState])


Parameter : sMachine : The name of the machine being set up.
Parameter : wMainWin : The main window of the application. (Optional)
Parameter : sAppState : The name of the machine's application state. (Optional)
Notes : Connects one machine and prepares it for application state functions.

Jagan Mohan Julooru 18


Function : iCount = GetTestsFailedCount ()
Returns : iTests : The total number of tests failed. INTEGER.
Notes : Returns the total number of tests that failed.

Function : iCount = GetTestsPassedCount ()


Returns : iTests : The total number of tests passed. Only testcases that
contain errors are counted. INTEGER.
Notes : Returns the total number of tests that passed.

Function : sTime = GetTotalElapsedStr ()


Returns : sTime : Elapsed time for execution. INTEGER.
Notes : Returns the elapsed time for the testcase to execute.

Function : sName = GetTestPlanName ()


Returns : sName : The name of the current testplan. Return value is NULL
if not in a testplan. STRING.
Notes : Returns the name of the current testplan.

Function : iCount = GetTotalWarningCount ()


Returns : iCount : The number of warnings generated in the current
testplan. INTEGER.
Notes : Returns the total number of warnings generated from all testcases executed
in the current testplan.

Function : iCount = GetTotalErrorCount()


Returns : iCount : Returns the total number of errors generated from all
testcases executed in the current testplan. INTEGER.
Notes : Returns the total number of errors generated from all testcases executed in
the current testplan.

Function : bTest = IsTestPlan ()

Jagan Mohan Julooru 19


Returns : bTest : TRUE if the testplan is running. BOOLEAN.
Notes : Tests whether a testplan is running.

#***********************************************************************

Group : Exception functions

Function : lcFunctions = ExceptCalls ()


Returns : lcFunctions : List of CALL records with info about each
function.
Notes : Returns a list of function calls that led to the exception.

Function : ExceptClear ()
Notes : Clears the information about the current exception.

Function : aData = ExceptData ()


Returns : aData : The returned data (can be any type).
Notes : Returns the data associated with the exception.

Function : ExceptLog ()
Notes : Logs the exception to the results file.

Function : iNum = ExceptNum ()


Returns : iNum : The returned integer.
Notes : Returns the number of the exception.

Function : ExceptPrint ()
Notes : Prints all information about the exception to the results file.

#***********************************************************************

Jagan Mohan Julooru 20


Group : File functions

Function : FileClose (hFile)


Parameter : hFile = myHandle : The handle (of type HFILE) to the file.
Notes : Closes a file on the host system.

Function : hFile = FileOpen (sPath, fmMode [, fsShare[, ftType]])


Returns : hFile : A handle to the opened file. HFILE.
Parameter : sPath : The name of the file to open. STRING.
Parameter : fmMode : FM_READ, FM_WRITE, FM_UPDATE, or
FM_APPEND. FILEMODE.
Parameter : fsShare : NULL, FS_DENY_NONE, FS_DENY_WRITE, or
FS_EXCLUSIVE. (Optional.) FILESHARE.
Parameter : ftType : NULL, FT_ANSI, FT_UTF8 or FT_UNICODE.
(Optional.) FILETYPE.
Notes : Opens a file on the host system.

Function : bDidRead = FileReadLine (hFile, sLine)


Returns : bDidRead : TRUE if a line was read, otherwise FALSE.
Parameter : hFile = myHandle : The handle (of type HFILE) to the file.
Parameter : sLine = myVar : The string variable to hold the line. (out)
Notes : Returns the next line of a file on the host system.

Function : bResult = FileReadValue (hFile, aValue)


Returns : bResult : TRUE if read operation is successful; FALSE if EOF.
Parameter : hFile : A handle (of type HFILE) to the open file.
Parameter : aValue : The data read from the file.
Notes : Reads structured data (e.g. a 4Test record) from a file on the host system.

Function : FileWriteLine (hFile, sLine)


Parameter : hFile = myHandle : The handle (of type HFILE) to the file.

Jagan Mohan Julooru 21


Parameter : sLine = "myText" : The string to write.
Notes : Writes a line of text to a file on the host system.

Function : iPos = FileSetPointer (hFile, iNewValue [, SetMode] )


Parameter : iPos : New read/write position in the file. INTEGER.
Parameter : hFile : The handle of the file to set the read/write position in.
(You get a file handle by calling the FileOpen function.) HFILE.
Parameter : iNewValue : Value that specifies new position, subject to value of
SetMode. INTEGER.
Parameter : SetMode : Optional. Mode to use to set new position. FILEPOS.
Notes : Sets the read/write position (in characters, not bytes) in an open file.

Function : FileWriteValue (hFile, aValue)


Parameter : hFile : A handle (of type HFILE) to the open file.
Parameter : aValue : The data (of type ANYTYPE) to write to the file.
Notes : Writes structured data (e.g. a 4Test record) to a file on the host system.

Function : IniFileClose (hIniFile)


Parameter : hIniFile = myHandle : A handle (of type HINIFILE) to the file.
Notes : Closes an .ini file on the host system.

Function : sValue = IniFileGetValue (hIniFile, sSection, sName)


Returns : sValue : The returned value.
Parameter : hIniFile = myIniFile : A handle (of type HINIFILE) to the file.
Parameter : sSection = "mySection" : The name of the section with the value.
Parameter : sName = "myVar" : The name of the variable to retrieve.
Notes : Returns a value from an open .ini file on the host system.

Function : hIniFile = IniFileOpen (sFile, [, ftType])


Returns : hIniFile : A handle (of type HINIFILE) to the file.
Parameter : sFile = "myIniFile" : The name of the file to open.

Jagan Mohan Julooru 22


Parameter : ftType : NULL, FT_ANSI, FT_UTF8 or FT_UNICODE.
(Optional) FILETYPE. Default : FT_ANSI
Notes : Opens an .ini file. If ftType is no NULL, then the format of sFile will be set
to ftType regardless the original format. If ftType is NULL, the format of sFile will be set
to FT_ANSI.

Function : IniFileSetValue (hIniFile, sSection, sName, sValue)


Parameter : hIniFile = myIniFile : A handle (of type HINIFILE) to the file.
Parameter : sSection = "mySection" : The name of the section of the file with
the value.
Parameter : sName = "myVar" : The name of the variable to change.
Parameter : sValue = "myValue" : The new value.
Notes : Changes a value in an open .ini file on the host system.

Function : bRemote = IsFileRemote (hFile)


Returns : bRemote : TRUE if the file handle is to a remote file or .ini file.
Parameter : hFile = myHandle : A handle to a file or .ini file, else FALSE.
Notes : Tests if the handle belongs to a remote file.

Function : SYS_FileClose (hFile)


Parameter : hFile = myHandle : The handle (of type HFILE) to the file.
Notes : Closes a file on the target system.

Function : hFile = SYS_FileOpen (sPath, fmMode [, fsShare[, ftType]])


Returns : hFile : A handle to the opened file. HFILE.
Parameter : sPath : The name of the file to open. STRING.
Parameter : fmMode : FM_READ, FM_WRITE, FM_UPDATE, or
FM_APPEND. FILEMODE.
Parameter : fsShare : NULL, FS_DENY_NONE, FS_DENY_WRITE, or
FS_EXCLUSIVE. (Optional.) FILESHARE.

Jagan Mohan Julooru 23


Parameter : ftType : NULL, FT_ANSI, FT_UTF8 or FT_UNICODE.
(Optional.) FILETYPE.
Notes : Opens a file on the target system.

Function : bDidRead = SYS_FileReadLine (hFile, sLine)


Returns : bDidRead : TRUE if a line was read, otherwise FALSE.
Parameter : hFile = myHandle : The handle (of type HFILE) to the file.
Parameter : sLine = myVar : The string variable to hold the line. (out)
Notes : Returns the next line of a file on the target system.

Function : bResult = SYS_FileReadValue (hFile, aValue)


Returns : bResult : TRUE if read operation is successful; FALSE if EOF.
Parameter : hFile : A handle (of type HFILE) to the open file.
Parameter : aValue : The data read from the file.
Notes : Reads structured data (e.g. a 4Test record) from a file on the target system.

Function : iPos = SYS_FileSetPointer (hFile, iNewValue [, SetMode] )


Parameter : iPos : New read/write position in characters in the file. INTEGER.
Parameter : hFile : The handle of the file to set the read/write position in.
(You get a file handle by calling the SYS_FileOpen function.) HFILE.
Parameter : iNewValue : Value that specifies new position, subject to value of
SetMode. INTEGER.
Parameter : SetMode : Optional. Mode to use to set new position. FILEPOS.
Notes : Sets the read/write position (in characters, not bytes) in an open file on a
target machine.

Function : SYS_FileWriteLine (hFile, sLine)


Parameter : hFile = myHandle : The handle (of type HFILE) to the file.
Parameter : sLine = "myText" : The string to write.
Notes : Writes a line of text to a file on the target system.

Jagan Mohan Julooru 24


Function : SYS_FileWriteValue (hFile, aValue)
Parameter : hFile : A handle (of type HFILE) to the open file.
Parameter : aValue : The data (of type ANYTYPE) to write to the file.
Notes : Writes structured data (e.g. a 4Test record) to a file on the target system.

Function : SYS_IniFileClose (hIniFile)


Parameter : hIniFile = myHandle : A handle (of type HINIFILE) to the file.
Notes : Closes an .ini file on the target system.

Function : sValue = SYS_IniFileGetValue (hIniFile, sSection, sName)


Returns : sValue : The returned value.
Parameter : hIniFile = myIniFile : A handle (of type HINIFILE) to the file.
Parameter : sSection = "mySection" : The name of the section with the value.
Parameter : sName = "myVar" : The name of the variable to retrieve.
Notes : Returns a value from an open .ini file on the target system.

Function : hIniFile = SYS_IniFileOpen (sFile, [, ftType])


Returns : hIniFile : A handle (of type HINIFILE) to the file.
Parameter : sFile = "myIniFile" : The name of the file to open.
Parameter : ftType : NULL, FT_ANSI, FT_UTF8 or FT_UNICODE.
(Optional) FILETYPE. Default : FT_ANSI
Notes : Opens an .ini file on a target system. If ftType is no NULL, then the format
of sFile will be set to ftType regardless the original format. If ftType is NULL, the format
of sFile will be set to FT_ANSI.

Function : SYS_IniFileSetValue (hIniFile, sSection, sName, sValue)


Parameter : hIniFile = myIniFile : A handle (of type HINIFILE) to the file.
Parameter : sSection = "mySection" : The name of the section of the file with
the value.
Parameter : sName = "myVar" : The name of the variable to change.
Parameter : sValue = "myValue" : The new value.

Jagan Mohan Julooru 25


Notes : Changes a value in an open .ini file on the target system.

#***********************************************************************

Group : List manipulation functions

Function : ListAppend (lList, aItem)


Parameter : lList = myList : The list to append to. (inout)
Parameter : aItem = "myItem" : The item to append.
Notes : Adds an item to the end of a list.

Function : iCount = ListCount (lList)


Returns : iCount : The number of items in the list.
Parameter : lList = myList : The list to count.
Notes : Counts the items in a list.

Function : ListDelete (lList, iIndex)


Parameter : lList = myList : The list to modify. (inout)
Parameter : iIndex = 4 : The index of the item to delete.
Notes : Deletes an item from a list.

Function : iPos = ListFind (lList, aItem)


Returns : iPos : The position of the item.
Parameter : lList = myList : The list to search.
Parameter : aItem = "myItem" : The item to find.
Notes : Finds an item in a list.

Function : ListInsert (lList, iIndex, aItem)


Parameter : lList = myList : The list to modify. (inout)
Parameter : iIndex = 4 : The position at which to insert.
Parameter : aItem = "myItem" : The item (of any type) to insert.

Jagan Mohan Julooru 26


Notes : Inserts a new item into a list.

Function : ListMerge (lOrig, lMerge [, iMergePos])


Parameter : lOrig = mergeInto : The list to modify. (inout)
Parameter : lMerge = mergeThis : The list to merge into lOrig.
Parameter : iMergePos : The position at which to merge. (Optional)
Notes : Merges two lists.

Function : ListPrint (lList)


Parameter : lList = myList : The list to print.
Notes : Prints a list to the results file.

Function : ListRead (lsList, sFileName)


Parameter : lsList = myList : A list of string variables. (out)
Parameter : sFileName = "myFile" : The name of the file.
Notes : Reads a list from a file into a variable.

Function : ListSort (lList)


Parameter : lList = myList : The list to sort. (inout)
Notes : Sorts the items in a list.

Function : ListWrite (lsList, sFileName)


Parameter : lsList = myList : The list to write.
Parameter : sFileName = "myFile" : The name of the file to write to.
Notes : Writes the contents of a list to a file.

Function : SYS_ListRead (lsList, sFileName)


Parameter : lsList = myList : A list of string variables. (out)
Parameter : sFileName = "myFile" : The name of the file.
Notes : Reads a list from a file located on a target machine into a variable.

Jagan Mohan Julooru 27


Function : SYS_ListWrite (lsList, sFileName)
Parameter : lsList = myList : The list to write.
Parameter : sFileName = "myFile" : The name of the file to write to.
Notes : Writes the contents of a list to a file located on a target machine.

#***********************************************************************

Group : Locale functions

Function : sLocale = GetLocale


Returns : sLocale : The returned value.
Notes : Gets the current value of the 4Test locale.

Function : sLocale = SetLocale (sLocale)


Returns : sLocale : The 4Test locale. To specify the native locale, use an
empty string. STRING
Notes : Sets the value of the 4Test locale.

Function : sLocale = SYS_GetLocale


Returns : sLocale : The returned value.
Notes : Gets the user locale of the machine on which the Application Under Test is
executing. For SilkTest International only.

#***********************************************************************

Group : Numeric functions

Function : nAbsValue = Abs (nNumber)

Jagan Mohan Julooru 28


Returns : nAbsValue : The absolute value of nNumber.
Parameter : nNumber = -10 : The number to compute.
Notes : Returns the absolute value of a number.

Function : nLarger = Max (n1, n2)


Returns : nLarger : The larger number.
Parameter : n1 = 2.2 : The first number to compare.
Parameter : n2 = 5.5 : The second number to compare.
Notes : Returns the larger of two numbers.

Function : nSmaller = Min (n1, n2)


Returns : nSmaller : The smaller number.
Parameter : n1 = 2.2 : The first number to compare.
Parameter : n2 = 5.5 : The second number to compare.
Notes : Returns the smaller of two numbers.

Function : SetPrecision (rPrecision)


Parameter : rPrecision = 4 : The precision. REAL
Notes : Sets the precision for comparing real numbers.

Function : nNewNum = Sqrt (nOrigNum)


Returns : nNewNum : The square root of nOrigNum.
Parameter : nOrigNum = 2 : The number to calculate.
Notes : Returns the square root of a number.

#***********************************************************************

Group : Random value functions

Function : iRand = RandInt (iMin, iMax)


Returns : iRand : The random integer.

Jagan Mohan Julooru 29


Parameter : iMin = 1 : The minimum value to return.
Parameter : iMax = 100 : The maximum value to return.
Notes : Returns a random integer.

Function : aItem = RandPick (lList)


Returns : aItem : A random item from the list.
Parameter : lList = myList : The list (of anytype) to pick from.
Notes : Picks a random item from a list.

Function : rRand = RandReal ()


Returns : rRand : The random real number.
Notes : Returns a random real number.

Function : RandSeed (iSeed)


Parameter : iSeed = 10 : An integer seed value.
Notes : Seeds the random number generator.

Function : sString = RandStr (sPicture)


Returns : sString : A random string derived from sPicture.
Parameter : sPicture = "AAAA" : A picture clause.
Notes : Returns a random string, using the sPicture format.

#***********************************************************************

Group : Product Version

Function : sString = GetPartnerVersion ()


Returns : sString : Full version of Partner including the copywrite
information.
Notes : Returns a string containing the version of Partner.

Jagan Mohan Julooru 30


Function : sString = GetPartnerBuildnum ()
Returns : sString : Version number of Partner.
Notes : Returns only the version information of Partner.

Function : sString = SYS_GetAgentVersion ()


Returns : sString : Full version of Agent including the copywrite
information.
Notes : Returns a string containing the version of Agent.

#***********************************************************************

Group : Results file functions

Function : AppError (sMessage)


Parameter : sMessage : The error message to log to the results file. STRING
Notes : Logs an error message, preceded by "***Error : ", to the results file.

Function : LogError (sMessage)


Parameter : sMessage : The error message to log to the results file. STRING
Notes : Logs the specified error message to the results file.

Function : LogVerifyError (aData1, aData2 [, sDesc])


Parameter : aData1 : The actual data discovered by the testcase. ANYTYPE
Parameter : aData2 : The data expected by the testcase. ANYTYPE
Parameter : sDesc : A description of the failed verification. (Optional)
STRING
Notes : Logs the error you describe to the results file.

Function : LogWarning (sWarning)


Parameter : sWarning : The warning to log to the results file.
Notes : Logs a warning to the results file.

Jagan Mohan Julooru 31


Function : Print (vaExpressions)
Parameter : vaExpressions = "abc", 123 : Any number of expressions of any
type.
Notes : Prints the values of the expressions to the results file.

Function : Printf (sFormat, vaArgs)


Parameter : sFormat = "%s%d" : The format to use.
Parameter : vaArgs = "abc", 123 : Any number of expressions of any type.
Notes : Prints a formatted expression to the results file.

Function : RaiseError (iExcept, sMessage)


Parameter : iExcept : The number of the exception to raise.
Parameter : sMessage : The error message; it gets appended to, "***Error: "
Notes : Raises specified exception and places error message in results file.

Function : ResCloseList ()
Notes : Closes a hierarchical level in results file opened with ResOpenList.

Function : ResOpenList (sName)


Parameter : sName : The name of the level as it will appear in results file.
Notes : Creates a new hierarchical level in the results file.

Function : ResPrintList (sName, lSubItems)


Parameter : sName : The name of the item as it will appear in results file.
Parameter : lSubItems : List of subitems to be indented under sName in results.
Notes : Creates a hierarchy in the results file.

Function : bPrevious = SetAgentTrace (bTraceOn)


Returns : bPrevious : The previous setting.
Parameter : bTraceOn = FALSE : TRUE to trace agent calls, FALSE to not.

Jagan Mohan Julooru 32


Notes : Specifies whether to print agent calls to the results file.

Function : Verify (aActual, aExpected [, sDesc])


Parameter : aActual = "xxx" : The actual value.
Parameter : aExpected = myvar : The expected value.
Parameter : sDesc : A description of the comparison. (Optional)
Notes : Verifies that an actual value matches an expected value.

Function : FuzzyVerify (aActual, aExpected [, sDesc])


Parameter : aActual : The value to verify. ANYTYPE.
Parameter : aExpected : The expected value. ANYTYPE.
Parameter : sDesc : A message describing the comparison. STRING.
(Optional)
Notes : Verifies that an actual value matches an expected value using fuzzy
verification.

Function : ResExport (sResultsFile [, sREXFile, iStartIndex, iEndIndex ])


Parameter : sResultsFile : The name of the results file containing the results set(s)
you want to export. STRING.
Parameter : sREXFile : Optional. Results export file to save the results set(s) to.
STRING.
Parameter : iStartIndex : Optional. Index of the most recent results set to save.
INTEGER.
Parameter : iEndIndex : Optional. Index of oldest results set to save. INTEGER.
Notes : Exports one or more results sets to a results export (.rex) file.

Function : ResExportOnClose ( [sREXFile] )


Parameter : sREXFile : Optional. Results export file to save the results set to.
STRING.
Notes : Exports the most recent results set from the current results file to a results
export (.rex) file.

Jagan Mohan Julooru 33


#***********************************************************************

Group : Script information functions

Function : lsArgs = GetArgs ()


Returns : lsArgs : The list of arguments. LIST OF STRING
Notes : Returns the arguments passed to a script.

Function : type = GetBrowserType ([hMachine])


Returns : type : The browser type. BROWSERTYPE
Parameter : hMachine : Handle for a particular machine. HMACHINE
(Optional)
Notes : Returns the browser type set for the current machine or the specified
machine. See SetBrowserType.

Function : type = GetDefaultBrowserType ()


Returns : type : The browser type. BROWSERTYPE
Notes : Returns the browser type that will be set by default for new connections. See
SetDefaultBrowserType.

Function : sDir = GetExecutableDir ()


Returns : sDir : The directory in which the Segue executable file resides.
STRING
Notes : Returns the location of the Segue executable file.

Function : sName = GetGuiName ([hMachine]))


Returns : sName : The name of the GUI.
Parameter : hMachine : Handle for a particular machine. HMACHINE
(Optional)
Notes : Returns the GUI name for the current machine or the specified machine.

Jagan Mohan Julooru 34


Function : iGuiSet = GetGuiSet ([hMachine])
Returns : iGuiSet : The returned GUI set (a bit mask). INTEGER
Parameter : hMachine : Handle for a particular machine. HMACHINE
(Optional)
Notes : Returns the GUI set of the current machine or the specified machine.

Function : type = GetGuiType ([hMachine])


Returns : type : The GUI type. GUITYPE
Parameter : hMachine : Handle for a particular machine. HMACHINE
(Optional)
Notes : Returns the GUI type for the current machine or the specified machine.

Function : sVersion = GetGuiVersion ([hMachine])


Returns : sVersion : The version number of the GUI. STRING
Parameter : hMachine : Handle for a particular machine. HMACHINE
(Optional)
Notes : Returns the GUI version for the current machine or the specified machine.

Function : sDir = GetProgramDir ()


Returns : sDir : The name of the directory. STRING
Notes : Returns the name of the directory containing the script that is running.

Function : sName = GetProgramName ()


Returns : sName : The name of the script. STRING
Notes : Returns the name of the script that is currently running.

Function : bTest = GetRel1ClassLibrary ()


Returns : bTest : TRUE if release 1.x library option is checked.
BOOLEAN

Jagan Mohan Julooru 35


Notes : Tests whether release 1.x library option is checked in Agent Options
window.

Function : sDir = GetStartupDir ()


Returns : sDir : The directory in which the Segue include files reside.
STRING
Notes : Returns the location of the Segue include files that are used at startup.

Function : laArgs = GetTestCaseArgs ()


Returns : laArgs : Arguments passed to testcase; NULL if not in a testcase.
Notes : Returns the list of arguments that were passed to the testcase.

Function : iErrCount= GetTestCaseErrorCount ()


Returns : iErrCount : The number of errors in the current testcase.
Notes : Returns the number of errors experienced by the current testcase.

Function : sName = GetTestCaseName()


Returns : sName : The name of current testcase; NULL if not in a testcase.
Notes : Returns the name of the current testcase.

Function : TestState = GetTestCaseState ()


Returns : TestState : TCS_ENTERING, TCS_RUNNING, TCS_EXITING,
or NULL.
Notes : Returns the state of the currently running testcase.

Function : iWarningCount= GetTestCaseWarningCount ()


Returns : iWarningCount : The number of warnings in the current testcase.
Notes : Returns the number of warnings experienced by the current testcase.

#***********************************************************************

Jagan Mohan Julooru 36


Group : Semaphore functions

Function : Acquire (sSemaphore)


Parameter : sSemaphore : The semaphore to acquire.
Notes : Acquires a semaphore for the calling thread.

Function : aData = GetThreadData (sName)


Returns : aData : Returned data. ANYTYPE
Parameter : sName : The data name assigned with SetThreadData. STRING
Notes : Gets the named data associated with the current thread.

Function : iThreadID = GetThreadId ()


Returns : iThreadID : The returned ID of the current thread. INTEGER
Notes : Gets the ID of the current thread.

Function : Release (sSemaphore)


Parameter : sSemaphore : The semaphore to release.
Notes : Releases a semaphore.

Function : SetThreadData (sName, aData)


Parameter : sName : The name to be assigned to the Data. STRING
Parameter : aData : The data to be named and associated with the thread.
ANYTYPE
Notes : Sets the named data and associates it with the current thread.

#***********************************************************************

Group : Set functions

Function : InSet = IsInSet (Set, Member)


Returns : InSet : Boolean, TRUE if Set contains Member.

Jagan Mohan Julooru 37


Parameter : Set : Set to test for containment of Member.
Parameter : Member : Set element.
Notes : The two parameters must be of the same Set type. This actually returns
TRUE if Member is a non-empty subset of Set.

Function : NewSet = SetAddMember (Set, NewMember)


Returns : NewSet : Set to which a new member is added. SET
Parameter : Set : Set which is to receive a new member. SET
Parameter : NewMember : Member to be added to a set. SET
Notes : Adds a member to a set.

Function : NewSet = SetComplement (Set)


Returns : NewSet : The complement of Set. SET
Parameter : Set : The set to be complemented. SET
Notes : Returns the complement of a set.

Function : iSetCount = SetCount (Set)


Returns : iSetCount : The number of members in the set.
Parameter : Set : The set for which to count members. SET
Notes : Returns the number of members in a set.

Function : Set = SetDomain (SetType)


Returns : Set : The returned set. SET
Parameter : SetType : The name of the set data type. TYPE
Notes : Returns a set which contains all the members in the set domain.

Function : SubSet = SetExclude (MainSet, ExcludeSet)


Returns : SubSet : The set after excluding all members in ExcludeSet. SET
Parameter : MainSet : The set from which to exclude some members. SET
Parameter : ExcludeSet : The set whose members to exclude from main set. SET
Notes : Returns first set after excluding members also in second set.

Jagan Mohan Julooru 38


Function : Set = SetIntersection (Set1, Set2)
Returns : Set : The resulting intersection set. SET
Parameter : Set1 : One set to be combined for the intersection. SET
Parameter : Set2 : The other set for the intersection. SET
Notes : Returns the intersection of two sets.

Function : NewSet = SetRemoveMember (Set, SetMember)


Returns : NewSet : The returned set after removing specified member. SET
Parameter : Set : The set from which a member is to be removed. SET
Parameter : SetMember : The set member to remove from Set. SET
Notes : Removes a member from a set.

Function : SetUnion = SetUnion (Set1, Set2)


Returns : SetUnion : The returned union of the specified sets. SET
Parameter : Set1 : The first of two sets to be joined. SET
Parameter : Set2 : The second of two sets to be joined. SET
Notes : Returns the union of two sets.

#***********************************************************************

Group : Status functions

Function : bReturn = PopTestInfo()


Parameter : bReturn : TRUE if message was removed from Runtime Status.
FALSE if not. BOOLEAN.
Notes : Removes a user-defined message from the SilkTest Runtime Status window.

Function : PushTestInfo(sInfo)

Jagan Mohan Julooru 39


Parameter : sInfo : Message to send to SilkRealizer and to appear in
SilkTest Runtime Status.
Notes : Sends a message to SilkRealizer and to the SilkTest Runtime Status window.

Function : SetMonitorStatus(iLevel[, sStatus])


Parameter : iLevel : Level of the message (0-5). 0 signifies a milestone in the
test. Equivalent to user levels 1-6 in the TDF Wizard. STRING.
Parameter : sStatus : Status message to send to SilkRealizer. STRING.
(Optional)
Notes : Sends a monitoring message to SilkRealizer.

Function : aReturn = SetTestStatus(sStatus)


Parameter : aReturn : The previous title in the Runtime Status window or
NULL if the previous title was the default title. ANYTYPE.
Parameter : sStatus : Status message to send to SilkRealizer and to appear in
the title of the Runtime Status. STRING. (Optional)
Notes : Sends a monitoring message to SilkRealizer and sets the title in the SilkTest
Runtime Status window.

#***********************************************************************

Group : String functions

Function : sSegment = GetField (sString, sDelim, iField)


Returns : sSegment : The returned segment.
Parameter : sString = sMyString : The string to search.
Parameter : sDelim = "," : The character(s) used to separate fields.
Parameter : iField = 2 : The number of the field to return.
Notes : Returns a segment (field) of a string.

Jagan Mohan Julooru 40


Function : sValue = HOST_GetEnv (sVar)
Returns : sValue : The returned value.
Parameter : sVar : The environment variable to check. STRING.
Notes : Returns the value of an environment variable on the host machine.

Function : bTest = IsAlpha (sString)


Returns : bTest : TRUE if the first character is a letter, else FALSE.
Parameter : sString = sMyString : The string to test.
Notes : Tests whether the first character of a string is a letter.

Function : bTest = IsDigit (sString)


Returns : bTest : TRUE if the first character is a digit.
Parameter : sString = sMyString : The string to test.
Notes : Tests whether the first character of a string is a digit.

Function : bTest = IsSpace (sString)


Returns : bTest : TRUE if the first character is whitespace, else FALSE.
Parameter : sString = sMyString : The string to test.
Notes : Tests whether the first character of a string whitespace.

Function : sSubstring = Left (sString, iNumChars)


Returns : sSubstring : The returned substring.
Parameter : sString = sMyString : The string to extract from.
Parameter : iNumChars = 5 : The number of characters to return.
Notes : Returns the left-most characters from a string.

Function : iLength = Len (sString)


Returns : iLength : The number of characters in the string.
Parameter : sString = sMyString : The string to measure.
Notes : Returns the length of a string.

Jagan Mohan Julooru 41


Function : sStripped = Ltrim (sToStrip)
Returns : sStripped : The stripped string.
Parameter : sToStrip = sMyString : The string to strip.
Notes : Strips leading whitespace from a string.

Function : bFound = MatchStr (sPattern, sString)


Returns : bFound : TRUE if the pattern was found, else FALSE.
Parameter : sPattern = "abc" : The pattern to search for.
Parameter : sString = sMyString : The string to search.
Notes : Looks for a pattern in a string.

Function : sNew = Replicate (sOrig, iCopies)


Returns : sNew : The replicated string.
Parameter : sOrig = sMyString : The string to replicate.
Parameter : iCopies = 4 : The number of copies to concatenate.
Notes : Replicates a string the specified number of times.

Function : sSubstring = Right (sString, iNumChars)


Returns : sSubstring : The returned substring.
Parameter : sString = sMyString : The string to extract from.
Parameter : iNumChars = 4 : The number of characters to return.
Notes : Returns the right-most characters of a string.

Function : sStripped = Rtrim (sToStrip)


Returns : sStripped : The stripped string.
Parameter : sToStrip = sMyString : The string to strip.
Notes : Strips trailing whitespace from a string.

Function : sSpaces = Space (iCount)


Returns : sSpaces : A string with the spaces.
Parameter : iCount = 10 : The number of spaces to return.

Jagan Mohan Julooru 42


Notes : Returns the specified number of space characters.

Function : iPos = StrPos (sSubstr, sTarget)


Returns : iPos : The position of the substring.
Parameter : sSubstr = "abc" : The substring to find.
Parameter : sTarget = sMyString : The string to search.
Notes : Returns the position of a substring.

Function : sChanged = StrTran (sOrig, sSearch, sReplace)


Returns : sChanged : The modified string.
Parameter : sOrig = sMyString : The string to search.
Parameter : sSearch = "abc" : The substring to find.
Parameter : sReplace = "XYZ" : The substring to substitute.
Notes : Searches for and replaces characters in a string.

Function : sChanged = Stuff (sOrig, iPos, iLen, sReplace)


Returns : sChanged : The modified string.
Parameter : sOrig = sMyString : The string to modify.
Parameter : iPos = 5 : The starting position.
Parameter : iLen = 2 : The number of characters to delete.
Parameter : sReplace = "abcd" : The substring to insert.
Notes : Inserts and deletes characters.

Function : sSubString = SubStr (sString, iPos [, iLen])


Returns : sSubString : The returned substring.
Parameter : sString = sMyString : The string to return characters from.
Parameter : iPos = 5 : The starting position.
Parameter : iLen = 10 : How many characters to return. (Optional)
Notes : Returns a substring.

Function : sTabs = Tabs (iAmount)

Jagan Mohan Julooru 43


Returns : sTabs : A string of tab characters.
Parameter : iAmount : The number of tabs to return.
Notes : Returns a specified number of tabs.

Function : sStripped = Trim (sToStrip)


Returns : sStripped : The stripped string.
Parameter : sToStrip = sMyString : The string to strip.
Notes : Strips leading and trailing whitespace from a string.

#***********************************************************************

Group : System functions

Function : bCompare = SYS_CompareBinary (sFile1, sFile2)


Returns : bCompare : TRUE if files are the same, else FALSE.
Parameter : sFile1 = "file1.exe" : The first file to compare.
Parameter : sFile2 = "file2.exe" : The second file to compare.
Notes : Compares two binary files.

Function : bCompare = SYS_CompareBitmap (sFile1, sFile2 [, sMask])


Returns : bCompare : TRUE if bitmaps are the same, else FALSE.
Parameter : sFile1 = "file1.bmp" : The first file to compare.
Parameter : sFile2 = "file2.bmp" : The second file to compare.
Parameter : sMask : The mask file to apply. (Optional)
Notes : Compares two bitmap files.

Function : bCompare = SYS_CompareText (sFile1, sFile2)


Returns : bCompare : TRUE if files are the same, else FALSE.
Parameter : sFile1 = "file1.exe" : The first text file to compare.
Parameter : sFile2 = "file2.exe" : The second text file to compare.
Notes : Compares two text files and reports whether or not they match.

Jagan Mohan Julooru 44


Function : SYS_CopyFile (sFile1, sFile2)
Parameter : sFile1 = "oldfile.txt" : The file to copy.
Parameter : sFile2 = "newfile.txt" : The file to copy to.
Notes : Copies a file.

Function : bExists = SYS_DirExists (sDir)


Returns : bExists : TRUE if directory exists, otherwise FALSE.
Parameter : sDir = "mydir" : The directory to check for.
Notes : Checks whether the specified directory exists.

Function : iReturn = SYS_Execute (sCmdLine, lsOutput)


Returns : iReturn : The integer return value of the command.
Parameter : sCmdLine = "DIR" : The command to execute.
Parameter : lsOutput = lsDIROut : The LIST OF STRING variable to hold
the output. (out)
Notes : Executes the specified command.

Function : bExists = SYS_FileExists (sFile)


Returns : bExists : TRUE if the file exists, otherwise FALSE.
Parameter : sFile = "file1.txt" : The file to check for.
Notes : Checks whether the specified file exists.

Function : iCRC = SYS_GetBitmapCRC (sBitmap [, sMaskFile])


Returns : iCRC : The CRC value of the bitmap.
Parameter : sBitmap = "myfile.bmp" : The bitmap to evaluate.
Parameter : sMaskFile : The mask file for the bitmap. (Optional)
Notes : Returns the CRC value of a bitmap file.

Function : sName = SYS_GetDir ()


Returns : sName : The name of the working directory.

Jagan Mohan Julooru 45


Notes : Returns the name of the current directory.

Function : lfInfo = SYS_GetDirContents ([sDir[, iUnits]])


Returns : lfInfo : A returned list of records. LIST OF FILEINFO
Parameter : sDir : The directory to check. (Optional)
Parameter : iUnits : DS_BYTES, DS_KILOBYTES, DS_MEGABYTES
and DS_TERABYTES. DATASETSIZE. (Optional defautl : DS_BYTES)
Notes : Returns information about the files in a directory.

Function : sName = SYS_GetDrive ()


Returns : sName : The name of the drive.
Notes : Returns the name of the current drive.

Function : sValue = SYS_GetEnv (sVar)


Returns : sValue : The value of the variable.
Parameter : sVar = "PATH" : The environment variable to check.
Notes : Returns the value of an environment variable.

Function : sContents = SYS_GetFileContents (sFileName)


Returns : sContents : The contents of the specified file as a list.
Parameter : sFileName : The name of the file on the target machine.
Notes : Returns the contents of the specified file on the target machine.

Function : iFree = SYS_GetFreeDiskSpace ([sDrive[, iUnits]])


Returns : iFree : The NUMBER of free disk space in units specified.
Parameter : sDrive : The drive to check. (Optional)
Parameter : iUnits : DS_BYTES, DS_KILOBYTES, DS_MEGABYTES
and DS_TERABYTES. DATASETSIZE. (Optional defautl : DS_BYTES)
Notes : Returns the amount of free disk space on the specified or current drive.

Function : iFree = SYS_GetFreeMemory ()

Jagan Mohan Julooru 46


Returns : iFree : The bytes of free memory.
Notes : Returns the amount of free memory.

Function : iFree = SYS_GetFreeResources ()


Returns : iFree : The returned percentage.
Notes : Returns the percentage of free system resources.

Function : lBytes = SYS_GetMemoryInfo (myWndTag, Counter)


Parameter : lBytes : The number of bytes of the performance counter
specified by Counter. LONG.
Parameter : myWndTag : The window. WNDTAG.
Parameter : Counter : The performance counter. MEMINFO.
Notes : Returns performance information on Windows NT.

Function : sName = SYS_GetName ()


Returns : sName : The returned name.
Notes : Returns the name of the operating system name the agent is running under.

Function : sValue = SYS_GetRegistryValue (iKey, sPath, sItem [, bConvert])


Returns : sValue : The returned value.
Parameter : iKey: The registry key to access.
Parameter : sPath : The registry path.
Parameter : sItem : The item to get.
Parameter : bConvert : TRUE if you want a registry value of type
REG_DWORD or REG_BINARY to be converted to an integer. BOOLEAN.
Notes : Returns the data value of an item in the Windows registry.

Function : sNumber = SYS_GetVersion ()


Returns : sNumber : The returned version number.
Notes : Returns the operating system version number the agent is running under.

Jagan Mohan Julooru 47


Function : SYS_Kill (iPid [, iSignal])
Parameter : iPid = iPID : The ID of the process to signal.
Parameter : iSignal : The signal to send. (Optional, the default is a kill
signal.)
Notes : Sends a signal to a process (UNIX systems only).

Function : SYS_MakeDir (sDir)


Parameter : sDir = "myNewDir" : The directory to create.
Notes : Creates a directory.

Function : SYS_MoveFile (sFile1, sFile2)


Parameter : sFile1 = "oldfile.txt" : The file to move.
Parameter : sFile2 = "newfile.txt" : The new name or directory for the file.
Notes : Moves the specified file.

Function : SYS_RemoveDir (sDir)


Parameter : sDir = "myDir" : The directory to delete.
Notes : Deletes a directory.

Function : SYS_RemoveFile (sFile)


Parameter : sFile = "myfile.txt" : The file to delete.
Notes : Deletes a file.

Function : SYS_Restart ()
Notes : Restarts the target Macintosh.

Function : SYS_SetDir (sDir)


Parameter : sDir = "mydir" : The directory to make current.
Notes : Changes the current working directory.

Function : SYS_SetDrive (sDrive)

Jagan Mohan Julooru 48


Parameter : sDrive = "c" : The drive to switch to.
Notes : Sets the current drive.

Function : SYS_SetEnv (sName, sValue)


Parameter : sName = "PATH"\APPLIC" : The name of the variable.
Parameter : sValue : The new value of the variable.
Notes : Sets the value of an environment variable.

Function : SYS_SetRegistryValue (iKey, sPath, sItem, sValue)


Parameter : iKey: The registry key to access.
Parameter : sPath : The registry path.
Parameter : sItem : The item to set.
Parameter : sValue : The value to set the item to.
Notes : Modifies any value in the Windows registry.

Function : SYS_VerifyText (sFile1, sFile2)


Parameter : sFile1 : The first file, containing the expected baseline value.
Parameter : sFile2 : The second file, containing the actual test result.
Notes : Compares two text files; raises error if there are differences.

#***********************************************************************

Group : Timer functions

Function : hTimer = TimerCreate ()


Returns : hTimer : A handle (of type HTIMER) to the new timer.
Notes : Creates a timer.

Function : TimerDestroy (hTimer)


Parameter : hTimer = myHandle : A handle (of type HTIMER) to the timer.
Notes : Destroys a timer.

Jagan Mohan Julooru 49


Function : TimerPause (hTimer)
Parameter : hTimer = myHandle : A handle (of type HTIMER) to the timer.
Notes : Pauses a timer.

Function : TimerResume (hTimer)


Parameter : hTimer = myHandle : A handle (of type HTIMER) to the timer.
Notes : Resumes a paused timer.

Function : TimerStart (hTimer)


Parameter : hTimer = myHandle : A handle (of type HTIMER) to the timer.
Notes : Starts a timer.

Function : State = TimerState (hTimer)


Returns : State : TS_STARTED, TS_STOPPED, or TS_PAUSED.
Parameter : hTimer = myHandle : A handle (of type HTIMER) to the timer.
Notes : Queries the state of a timer.

Function : TimerStop (hTimer)


Parameter : hTimer = myHandle : A handle (of type HTIMER) to the timer.
Notes : Stops a timer.

Function : sElapsed = TimerStr (hTimer)


Returns : sElapsed : The elapsed time.
Parameter : hTimer = myHandle : A handle (of type HTIMER) to the timer.
Notes : Returns a timer's elapsed time as a string.

Function : rElapsed = TimerValue (hTimer)


Returns : rElapsed : The elapsed time (of type REAL).
Parameter : hTimer = myHandle : A handle (of type HTIMER) to the timer.
Notes : Returns a timer's elapsed time as a real number.

Jagan Mohan Julooru 50


#***********************************************************************

Group : Tools function

Function : ls = RunLinkTester (lit)


Returns : ls : Data returned from Link Tester. LIST OF STRING
Parameter : lit : Record containing data used by Link Tester
Notes : Starts the Link Tester and runs a scan of links using the specified data.

#***********************************************************************

Group : Window functions

Function : Class = ClassOf (wWindow)


Returns : Class : The Class of the window.
Parameter : wWindow = myDialog : The window to check.
Notes : Returns the Class of a window.

Function : ldClassList = FindWinClass ([dClass, GuiType])


Returns : ldClassList : The Classes of current objects. LIST OF
DATACLASS
Parameter : dClass : Limits results to objects of this DATACLASS.
(Optional)
Parameter : GuiType : Gets objects on machines of this GUITYPE only.
(Optional)
Notes : Returns data Classes of objects declared on currently connected machines.

Function : lwWinList = FindWindow ([sTag, GuiType])


Returns : lwWinList : The window handles of current objects. LIST OF
WINDOW

Jagan Mohan Julooru 51


Parameter : sTag : Limits results to objects with this tag. (Optional)
Parameter : GuiType : Gets objects of this GUITYPE that match sTag.
(Optional)
Notes : Gets window handles of all objects or those that match sTag on GuiType.

Function : lwChildren = WindowChildren (wWindow [, GUIType])


Returns : lwChildren : A list of the child windows. LIST OF WINDOW
Parameter : wWindow = myDialog : The window to check. WINDOW
Parameter : GUIType : GUITYPE for which to return children. (Optional)
Notes : Returns children of a window, from the declaration for the current or
specified GUI.

Function : laAttrs = WindowGetAttrList (wWindow)


Returns : laAttrs : The attribute values for this window. LIST OF
ANYTYPE
Parameter : wWindow : Window for which you want attributes. WINDOW
Parameter : sName : Name of the child window, Method, variable, or
property.
Notes : Returns the values for all attributes of the specified window.

Function : bResult = WindowIsDefined (wWindow, sName [, wcClass,


sSource])
Returns : bResult : TRUE : defined by wWindow or its Class; FALSE
: not defined.
Parameter : wWindow : Window to test for sName.
Parameter : sName : Name of the child window, Method, variable, or
property.
Parameter : wcClass : Window Class that defines sName (or NULL). (out)
(Optional)
Parameter : sSource : Name of the file where sName is defined. (out)
(Optional)

Jagan Mohan Julooru 52


Notes : Is child window, Method, variable, or property defined by a window or its
Class?

Function : bTest = WindowIsOfClass (wWindow, dClass [, bExact])


Returns : bResult : TRUE if wWindow matches dClass; FALSE if no
match.
Parameter : wWindow : Window to test for Class. WINDOW
Parameter : dClass : The data Class to test wWindow for. DATACLASS
Parameter : bExact : TRUE matches exactly; FALSE also matches for
parents.
Notes : Determines if a particular window is of a particular Class or Class family.

Function : sID = WindowName (wWindow)


Returns : sID : The identifier of the window.
Parameter : wWindow = wCurrent : The window to check.
Notes : Returns the identifier of a window as a string.

Function : wParent = WindowParent (wWindow [, GUIType])


Returns : wParent : The parent of the window.
Parameter : wWindow = myDialog : The window to check.
Parameter : GUIType : GUITYPE for which to return parent. (Optional)
Notes : Returns parent of a window, from the declaration for the current or specified
GUI.

Function : sTag = WindowTag (wWindow [, iGuiType])


Returns : sTag : The fully-qualified window tag for the window.
Parameter : wWindow : The window for which to return the window tag.
Parameter : iGuiType : The GUI you want the tag to be valid for. (Optional)
Notes : Returns the window tag for a window on the current or specified GUI.

#***********************************************************************

Jagan Mohan Julooru 53


Group : Year 2000 date transformation functions

Function : bValidDate = ParseDateFormat (sDate, sFormat [, dtParsedDate,


iThreshold, iMinYear, iMaxYear, iAging ] )
Returns : bValidDate : TRUE if sDate is a valid date of the format
sFormat and passes the iMinYear and iMaxYear tests. BOOLEAN.
Parameter : sDate : The string containing the date to parse. STRING.
Parameter : sFormat : The date format to compare sDate against. STRING.
Parameter : dtParsedDate : Output variable to hold the parsed date if
bValidDate is TRUE. DATETIME (time component is undefined). (Optional)
Parameter : iThreshold : Specifies how to convert a two-digit year in sDate to a
four-digit year. INTEGER. (Optional)
Parameter : iMinYear : A factor in considering whether the date passes
validation. If the date after transformation (after applying iThreshold and iAging) is less
than iMinYear, bValidDate is set to FALSE. Specify a four-digit year. INTEGER.
(Optional)
Parameter : iMaxYear : A factor in considering whether the date passes
validation : If the date after transformation (after applying iThreshold and iAging)
is greater than iMaxYear, bValidDate is set to FALSE. Specify a four-digit year.
INTEGER. (Optional)
Parameter : iAging : Number of years to add to the date after transformation,
after application of iThreshold. The date February 29 is aged to February 28 if the
resulting year is not a leap year. INTEGER. (Optional)
Notes : Parses a string containing a date and validates each component of the date by
comparing it to a specified format.

Function : bValidDate = TransformDate (sDate [, sRule, sTransformedDate,


dtTransformedDate])
Returns : bValidDate : TRUE if sDate is a valid date according to the
transformation rule(s). BOOLEAN.
Parameter : sDate : The string containing the date to transform. STRING.

Jagan Mohan Julooru 54


Parameter : sRule : The transformation rule to apply to date. STRING.
Otherwise, uses the rule in the Runtime Options dialog. (Optional)
Parameter : sTransformedDate : Output variable to hold a string representation of
the transformed date (if bValidDate is TRUE. STRING.(Optional)
Parameter : dtTransformedDate : Output variable to hold the transformed date (if
bValidDate is TRUE). DATETIME. (time component is undefined) (Optional)
Notes : Transforms a string representing a date into another date string or a
DATETIME.

Function : bOldValue = UseY2KRules (bUse)


Returns : bOldValue : The previous Y2K setting. BOOLEAN.
Parameter : bUse : TRUE means enable enable the Y2K date transformation
rules. FALSE means disable the rules. BOOLEAN.
Notes : Allows a temporary override of the runtime setting that enables the use of
Year 2000 date transformation rules.

#***********************************************************************

Class : AgentClass

Method : Agent.DisplayMessage (sTitle, sMessage)


Parameter : sTitle = "myTitle" : The title of the message box.
Parameter : sMessage = "myMessage" : The contents of the message box.
Notes : Displays message box, halting script until user dismisses the message.

Method : aValue = Agent.ExtensionOption (aExtension, sOption)


Returns : aValue : Value of the specified option, sOption. ANYTYPE.
Parameter : aExtension : Name of extension specified as a string or a window.
ANYTYPE.
Parameter : sOption : Name of an extension option; case-sensitive. STRING.
Notes : Returns the current value of the extension option.

Jagan Mohan Julooru 55


Method : llsValues = Agent.GetExtensionOptions(sExtensionName)
Returns : llsValues : Values describing the Agent options. LIST OF LIST OF
STRING.
Parameter : sExtensionName : Name of the .DLL or .VXX file that is loaded.
STRING.
Notes : Returns information about the Agent options for the specified extension.

Method : Agent.FlushEvents ()
Notes : Causes queued keyboard and mouse events to be generated immediately.

Method : aValue = Agent.GetOption (Option)


Returns : aValue : The value of the option.
Parameter : Option = OPT_KEYBOARD_DELAY : The name of the option.
Notes : Returns the value of the specified agent option.

Method : bOfClass = object.IsOfClass (dClass [,bExact])


Returns : bOfClass : TRUE if object is of dClass or a child of dClass.
Parameter : dClass : The Class to test for (of type DATACLASS).
Parameter : bExact : If TRUE, returns exact match of dClass. (Optional)
Notes : Tests whether the object is of the specified Class.

Method : bTest = Agent.IsOptionValid (aoOptionName)


Returns : bTest : TRUE if the Agent recognizes aoOptionName as a valid
option. BOOLEAN.
Parameter : aoOptionName : The name of the option to test for.
AGENTOPTION.
Notes : Tests whether or not the Agent recognizes the specified option.

Method : aPrevious = Agent.SetOption (Option, aValue)


Returns : aPrevious : The previous value of the option

Jagan Mohan Julooru 56


Parameter : Option = OPT_KEYBOARD_DELAY : The name of the option.
Parameter : aValue = .5 : The new value for the option.
Notes : Sets an agent option to the specified value.

#**********************************************************************

Class : AnyWin

Method : window.BeginDragAt (iButton, iX, iY[, iShiftKeys])


Parameter : iButton : Mouse button to press (1 for left, 2 for right, 3 for
center).
Parameter : iX : Horizontal coordinate relative to current window at which to
press mouse button.
Parameter : iY : Vertical coordinate relative to current window at which to press
mouse button.
Parameter : iShiftKeys : Keys to hold down during the drag : 1 is Alt, 2 is
Control, 4 is Shift. (Optional)
Notes : Presses a mouse button in a window and begins dragging an object.

Method : window.CaptureBitmap (sBitmapFile [, Rect])


Parameter : sBitmapFile = "myfile.bmp" : The name of the file to save the
bitmap to.
Parameter : Rect : Coordinates for the capture region. (Optional)
Notes : Saves a bitmap image to a file.

Method : window.ClearTrap ()
Notes : Removes a trap set for the window.

Method : window.Click ([iButton, iXpos, iYpos, bRawEvent])


Parameter : iButton : The mouse button to click. (Optional)
Parameter : iXpos : The horizontal coordinate. (Optional)

Jagan Mohan Julooru 57


Parameter : iYpos : The vertical coordinate. (Optional)
Parameter : bRawEvent : (32-bit Windows only) Specifies playback mechanism.
(Optional)
Notes : Clicks a mouse button on the window.

Method : window.DoubleClick ([iButton, iXpos, iYpos, bRawEvent])


Parameter : iButton : The mouse button to click. (Optional)
Parameter : iXpos : The horizontal coordinate (Optional)
Parameter : iYpos : The vertical coordinate. (Optional)
Parameter : bRawEvent : (32-bit Windows only) Specifies playback mechanism.
(Optional)
Notes : Double-clicks a mouse button on the window.

Method : window.DragMouse (iButton, iXstart, iYstart, iXend, iYend [,


iShiftKeys])
Parameter : iButton : Mouse button to press (1 for left, 2 for right, 3 for
center).
Parameter : iXstart : Horizontal coordinate relative to current window at
which to press mouse button.
Parameter : iYstart : Vertical coordinate relative to current window at which
to press mouse button.
Parameter : iXend : Horizontal coordinate relative to current window at
which to release mouse button.
Parameter : iYend : Vertical coordinate relative to current window at which
to release mouse button.
Parameter : iShiftKeys : Keys to hold down during the drag : 1 is Alt, 2 is
Control, 4 is Shift. (Optional)
Notes : Presses mouse button at specified location and releases button at another
location.

Method : window.EndDragAt (iX, iY)

Jagan Mohan Julooru 58


Parameter : iX : Horizontal coordinate relative to current window at which to
release mouse button.
Parameter : iY : Vertical coordinate relative to current window at which to
release mouse button.
Notes : Releases mouse button and dragged item at specified location.

Method : bExists = window.Exists ([nTimeout])


Returns : bExists : TRUE if the window exists, otherwise FALSE.
Parameter : nTimeout : The seconds to wait. (Optional)
Notes : Tests whether the window exists.

Method : lsDeclarations = window.GenerateDecl (bCompleteDecl)


Returns : lsDeclarations : A list containing the declaration.
Parameter : bCompleteDecl : TRUE not to stop on BrowserChild level.
(BOOLEAN, OPTIONAL)
Notes : Returns the declaration for the window.

Method : iID = window.GetAppId ()


Returns : iID : The application identifier (an integer).
Notes : Returns the ID of the application displaying the window.

Method : aValue = window.GetArrayProperty (sName, iIndex)


Returns : aValue : The requested property (anytype).
Parameter : sName : The name of the property array (string).
Parameter : iIndex : The index of the property to get (integer).
Notes : Returns a property specified by array name and index.

Method : iCRC = window.GetBitmapCRC ([Rect, sMaskFile])


Returns : iCRC : The CRC value.
Parameter : Rect : The coordinates of the region. (Optional)
Parameter : sMaskFile : The name of the mask file. (Optional)

Jagan Mohan Julooru 59


Notes : Returns the CRC value of a bitmap captured from the screen.

Method : sCaption = window.GetCaption ([bRawMode, bNoStaticText])


Returns : sCaption : The text associated with the window.
Parameter : bRawMode : TRUE to include platform-specific characters.
(Optional)
Parameter : bNoStaticText : TRUE to return empty string (instead of prior
static text) if window has no caption. (Optional)
Notes : Returns the text associated with the window.

Method : lwChildren = window.GetChildren ([bInvisible, bNoTopLevel])


Returns : lwChildren : The window children.
Parameter : bInvisible : TRUE to include invisible windows. Default is FALSE.
(Optional)
Parameter : bNoTopLevel : TRUE to not return windows of Class MainWin,
ChildWin, or BrowserChild. Default is FALSE. (Optional)
Notes : Returns the children of the window, as a list of windows.

Method : Class = window.GetClass ()


Returns : Class : The Class of the window (a DATACLASS).
Notes : Returns the Class of the window.

Method : lsContents = window.GetContents ([bRawMode])


Returns : lsContents : The contents of the window.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the contents of the window, as a list of strings.

Method : lsEverything = window.GetEverything ()


Returns : lsEverything : The contents and attributes of the window.
Notes : Returns the contents and attributes of the window, as a list of strings.

Jagan Mohan Julooru 60


Method : sFile = window.GetExtension ()
Returns : sFile : Name of the .DLL or .VXX file for the extension
associated with the window. NULL if no extension is loaded. STRING.
Notes : Returns the .DLL or .VXX file for the extension associated with the
specified window.

Method : iHandle = window.GetHandle ()


Returns : iHandle : The window's internal handle (an integer).
Notes : Returns the internal handle of the window.

Method : sText = window.GetHelpText ()


Returns : sText : The window's popup help text (a string).
Notes : Returns popup help text associated with a window.

Method : sID = window.GetID ()


Returns : sID : The window identifier (a string).
Notes : Returns the identifier of the window.

Method : iIndex = window.GetIndex ()


Returns : iIndex : The index of the window (an integer).
Notes : Returns the index of the window.

Method : sText = window.GetInputLanguage ()


Returns : sText : The window's input language (a string).
Notes : Returns input language currently in use for a window.

Method : lpPropInfo = window.GetManyProperties ([lsProperties])


Returns : lpPropInfo : A list of PROPINFO records.
Parameter : lsProperties : A list of some properties to get. (Optional)
Notes : Returns values for all window properties or specified properties.

Jagan Mohan Julooru 61


Method : sName = window.GetName ()
Returns : sName : The name of the window (a string).
Notes : Returns the name of the window.

Method : Class = window.GetNativeClass ()


Returns : Class : The native Class of the window (a STRING).
Notes : Returns the native Class of the window.

Method : wParentWin = window.GetParent ()


Returns : wParentWin : The window that is the parent.
Notes : Returns the parent of the window.

Method : prop = window.GetProperty (sName)


Returns : prop : The requested property (ANYTYPE).
Parameter : sName : The name of the property to get (string).
Notes : Returns a property specified by name.

Method : lsProps = window.GetPropertyList ()


Returns : lsProps : The list of property names (list of anytype).
Notes : Returns the list of properties that a window maintains.

Method : Rect = window.GetRect ([bGlobal])


Returns : Rect : A RECT with the size and position.
Parameter : bGlobal : TRUE to use the whole screen. (Optional)
Notes : Returns the size and position of the window.

Method : aValue = window.GetResource (sResource)


Returns : aValue : The value of the resource.
Parameter : sResource = "background" : The name of the resource.
Notes : Returns the value of the specified resource.

Jagan Mohan Julooru 62


Method : lsResources = window.GetResourceList ()
Returns : lsResources : The resources for the window.
Notes : Returns the names of the window resources, as a list of string.

Method : sTag = window.GetTag ()


Returns : sTag : The tag for the window.
Notes : Returns the fully qualified tag for a window.

Method : laValues = object.InvokeJavaClass()


Notes : Do not invoke this Method directly. Use the convenience Method
AnyWin.InvokeJava().

Method : laValues = object.InvokeJava (sUserJavaClass [, laArgs])


Returns : laValues : List of values returned from sUserJavaClass to 4Test.
First value is Boolean indicating success or failure.
Parameter : sUserJavaClass : The user's Java Class, to be invoked from 4Test.
Parameter : laArgs : List of values to be passed from 4Test to
sUserJavaClass. (Optional)
Notes : Invokes user's Java Class from 4Test.

Method : laValues = JavaBeanObject.GetBeanInfo (sParam, [, sValue])


Returns : laValues : The information returned about the JavaBean. First
value is Boolean indicating success or failure.
Parameter : sParam : "BeanName", "MethodNames", "PropertyNames",
"EventListeners", "EventListenerMethods", or "IconSize"
Parameter : sValue : An additional value required by some of the sParam
arguments. (Optional)
Notes : Accesses information about a JavaBean that has been exposed in its
BeanInfo Class.

Method : bActive = window.IsActive ()

Jagan Mohan Julooru 63


Returns : bActive : TRUE if window is active, otherwise FALSE.
Notes : Tests whether the window is the active window.

Method : bIsArray = window.IsArrayProperty (sName)


Returns : bIsArray : TRUE if the property is an array (boolean).
Parameter : sName : The name of the property to query (string).
Notes : Tests whether a property supports an array of values.

Method : bDefined = window.IsDefined (sName)


Returns : bDefined : TRUE if identifier is defined, else FALSE.
Parameter : sName = "OKButton" : The identifier to check.
Notes : Tests whether the child window is defined in the declaration.

Method : bEnable = window.IsEnabled ()


Returns : bEnable : Returns TRUE if the window is enabled.
Notes : Tests whether the window is enabled.

Method : bOfClass = window.IsOfClass (dClass [,bExact])


Returns : bOfClass : TRUE if window is of dClass or a child of dClass.
Parameter : dClass : The Class to test for (of type DATACLASS).
Parameter : bExact : If TRUE, returns exact match of dClass. (Optional)
Notes : Tests whether the window is of the specified Class.

Method : bManaged = window.IsManaged ()


Returns : bManaged : TRUE if the object is connected to a parent.
Notes : Tests whether a window object is connected to a parent.

Method : bRealized = window.IsRealized ()


Returns : bRealized : TRUE if the object has been created.
Notes : Tests whether a window object has been created (assigned a window ID).

Jagan Mohan Julooru 64


Method : bViewable = window.IsViewable ()
Returns : bViewable : TRUE if the object is viewable.
Notes : Tests whether a window object is viewable (not minimized).

Method : bVisible = window.IsVisible ()


Returns : bVisible : TRUE if visible, FALSE if declared a hidden window.
Notes : Tests whether window is of visible type or hidden type.

Method : window.MenuSelect (iX, iY, sItem)


Parameter : iX = 33 : The horizontal coordinate at which to press the mouse.
Parameter : iY = 22 : The vertical coordinate at which to press the mouse.
Parameter : sItem : The item to select.
Notes : Selects an item from a popup menu not implemented as a distinct window
that displays when button 1 is pressed.

Method : window.MoveMouse ([iXpos, iYpos, bRawEvent])


Parameter : iXpos : The horizontal coordinate. (Optional)
Parameter : iYpos : The vertical coordinate. (Optional)
Parameter : bRawEvent : (32-bit Windows only) Specifies playback mechanism.
(Optional)
Notes : Moves the mouse pointer to the specified location in the window.

Method : window.MultiClick (iCount [, iButton, iXpos, iYpos, bRawEvent])


Parameter : iCount = 5 : The number of clicks.
Parameter : iButton : The mouse button to click. (Optional)
Parameter : iXpos : The horizontal coordinate. (Optional)
Parameter : iYpos : The vertical coordinate. (Optional)
Parameter : bRawEvent : (32-bit Windows only) Specifies playback mechanism.
(Optional)
Notes : Generates multiple mouse clicks on the window.

Jagan Mohan Julooru 65


Method : window.PopupSelect (iX, iY, sItem)
Parameter : iX = 33 : The horizontal coordinate at which to press the mouse.
Parameter : iY = 22 : The vertical coordinate at which to press the mouse.
Parameter : sItem : The item to select.
Notes : Selects an item from a popup menu not implemented as a distinct window
that displays when button 2 is pressed.

Method : window.PressKeys (sKeys [, nDelay])


Parameter : sKeys = "Shift" : The keys to type or mouse buttons to press.
Parameter : nDelay : The delay between events. (Optional)
Notes : Presses (but does not release) a set of keys.

Method : window.PressMouse ([iButton, iXpos, iYpos, bRawEvent])


Parameter : iButton : The mouse button to press. (Optional)
Parameter : iXpos : The horizontal coordinate. (Optional)
Parameter : iYpos : The vertical coordinate. (Optional)
Parameter : bRawEvent : (32-bit Windows only) Specifies playback mechanism.
(Optional)
Notes : Presses (but does not release) a mouse button in the window.

Method : window.ReleaseKeys (sKeys [, nDelay])


Parameter : sKeys = "Shift" : The keys or mouse buttons to release.
Parameter : nDelay : The delay between events. (Optional)
Notes : Releases a set of keys.

Method : window.ReleaseMouse ([iButton, iXpos, iYpos, bRawEvent])


Parameter : iButton : The mouse button to press. (Optional)
Parameter : iXpos : The horizontal coordinate. (Optional)
Parameter : iYpos : The vertical coordinate. (Optional)
Parameter : bRawEvent : (32-bit Windows only) Specifies playback mechanism.
(Optional)

Jagan Mohan Julooru 66


Notes : Releases a mouse button in the window.

Method : object.ScrollIntoView ([iXpos, iYpos])


Parameter : iXpos : The horizontal coordinate, relative to the object. Default
is 0. (Optional)
Parameter : iYpos : The vertical coordinate, relative to the object. Default is
0. (Optional)
Notes : Scrolls an object into view.

Method : window.SetArrayProperty (sName, iIndex, aValue)


Parameter : sName : The name of the property array (string).
Parameter : iIndex : The index of the property to set (integer).
Parameter : aValue : The value to set for the property (anytype).
Notes : Sets the value of an array property.

Method : window.SetInputLanguage (sName)


Parameter : sName : The name of the input language (string).
Notes : Changes the input language and keyboard layout for a window.

Method : window.SetParentActive ()
Notes : Sets the parent application active (goes up the window hierarchy until
finding the application parented to the Desktop and makes that application active).

Method : window.SetProperty (sName, aValue)


Parameter : sName : The name of the property (string).
Parameter : aValue : The value to set for the property (anytype).
Notes : Sets the value of a property.

Method : window.SetTrap (ButtonTag [, iExceptNum, sExceptData])


Parameter : ButtonTag = "OK" : The label of the pushbutton to press.
Parameter : iExceptNum : The number of the exception to raise. (Optional)

Jagan Mohan Julooru 67


Parameter : sExceptData : The message to report. (Optional)
Notes : Sets a trap on the window to check when it comes into existence.

Method : window.TypeKeys (sEvents [, nDelay])


Parameter : sEvents = "Shift-End" : The keystrokes or mouse buttons.
Parameter : nDelay : The delay between events. (Optional)
Notes : Sends keystrokes or mouse button presses to the window.

Method : window.VerifyActive ()
Notes : Verifies that the window is active.

Method : window.VerifyBitmap (sBitmapFile [, Rect, sMaskFile])


Parameter : sBitmapFile = "myfile.bmp" : The name of the baseline file.
Parameter : Rect : The area to capture. (Optional)
Parameter : sMaskFile : The name of the mask file. (Optional)
Notes : Verifies that the screen image matches a saved bitmap of the image.

Method : window.VerifyEnabled ()
Notes : Verifies that the window is enabled.

Method : window.VerifyEverything (lsEverything)


Parameter : lsEverything : The contents and attributes of the window.
Notes : Verifies the contents and attributes of the window.

Method : window.VerifyProperties (WinPropTree [,FuzzyVerifyWhich])


Parameter : WinPropTree : The WINPROPTREE record holding the
expected values.
Parameter : FuzzyVerifyWhich : Used with fuzzy verification. FUZZYVERIFY.
(Optional)
Notes : Verifies values of specified properties of the window and its children.

Jagan Mohan Julooru 68


Method : nSeconds = window.WaitBitmap (sFile, nTimeout [, Rect, sMask])
Returns : nSeconds : The seconds it took for the bitmap to appear.
Parameter : sFile = "myfile.bmp" : The name of the baseline bitmap file.
Parameter : nTimeout = 5 : The seconds to wait to raise an exception.
Parameter : Rect : The area to capture. (Optional)
Parameter : sMask : The name of the mask file. (Optional)
Notes : Waits for screen image to match file, returning how long it took to match.

property : bActive
Notes : Whether the window is active (read only).

property : AppID
Notes : The identification number of the application (read only).

property : sCaption
Notes : The caption of the window (read only).

property : lwChildren
Notes : The child windows of the window (read only).

property : Class
Notes : The Class of the window (read only).

property : bEnabled
Notes : Whether the window is enabled (read only).

property : bExists
Notes : Whether the window exists (read only).

property : sID
Notes : The GUI identifier of the window (used internally) (read only).

Jagan Mohan Julooru 69


property : iIndex
Notes : The index of the window (read only).

property : sName
Notes : The 4Test identifier of the window, from the declaration (read only).

property : WndTag
Notes : The window tag of the window (read only).

property : hWnd
Notes : The internal handle of the window (read only).

property : wParent
Notes : The parent of the window (read only).

property : Rect
Notes : The size and position of the window (read only).

#***********************************************************************

Class : CheckBox

Method : checkbox.Check ()
Notes : Checks the checkbox.

Method : bState = checkbox.GetState ()


Returns : bState : TRUE if checked, otherwise FALSE.
Notes : Returns the selection state of the checkbox.

Method : bState = checkbox.IsChecked ()

Jagan Mohan Julooru 70


Returns : bState : TRUE if checked, otherwise FALSE.
Notes : Tests whether the checkbox is checked.

Method : checkbox.SetState (bState)


Parameter : bState = TRUE : TRUE to check, FALSE to uncheck.
Notes : Sets the state of the checkbox.

Method : checkbox.Toggle ()
Notes : Toggles the state of the checkbox.

Method : checkbox.Uncheck ()
Notes : Unchecks the checkbox.

Method : checkbox.VerifyValue (bExpected)


Parameter : bExpected = TRUE : TRUE for checked, FALSE for unchecked.
Notes : Verifies the state of the checkbox.

property : bChecked
Notes : Whether the checkbox is checked (read only).

property : bValue
Notes : The state of the checkbox.

#**********************************************************************

Class : ChildWin

Method : window.Invoke ()
Notes : Invokes the window, using the wInvoke variable in the declaration.

#**********************************************************************

Jagan Mohan Julooru 71


Class : ClipboardClass

Method : lsText = Clipboard.GetText ()


Returns : lsText : The clipboard text.
Notes : Returns the text on the clipboard as a list of string.

Method : bOfClass = object.IsOfClass (dClass [,bExact])


Returns : bOfClass : TRUE if object is of dClass or a child of dClass.
Parameter : dClass : The Class to test for (of type DATACLASS).
Parameter : bExact : If TRUE, returns exact match of dClass. (Optional)
Notes : Tests whether the object is of the specified Class.

Method : Clipboard.SetText ([lsText])


Parameter : lsText : The text to write to the clipboard. (Optional)
Notes : Replaces the text in the clipboard.

property : lsValue
Notes : The text in the clipboard.

#**********************************************************************

Class : ComboBox

Method : combobox.ClearText ()
Notes : Removes all text from the text field of the combo box.

Method : iIndex = combobox.FindItem (sItem)


Returns : iIndex : The index of the item.
Parameter : sItem = "myItem" : The text of the item to find.
Notes : Returns the index of the specified combo box item.

Jagan Mohan Julooru 72


Method : lsContents = combobox.GetContents ([bRawMode])
Returns : lsContents : The contents of the list.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the contents of the combo box as a list of string.

Method : iCount = combobox.GetItemCount ()


Returns : iCount : The number of items.
Notes : Returns the number of items in the combo box listbox.

Method : sText = combobox.GetItemText (iIndex [, bRawMode])


Returns : sText : The text of the item.
Parameter : iIndex = 5 : The index of the item to find.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the text of a combo box item.

Method : iIndex = combobox.GetSelIndex ()


Returns : iIndex : The index of the item.
Notes : Returns the index of the selected combo box item.

Method : sText = combobox.GetSelText ()


Returns : sText : The text of the item.
Notes : Returns the text of the selected combo box item.

Method : lsText = combobox.GetText ()


Returns : lsText : The text in the text field.
Notes : Returns the text in the combo box text field.

Method : combobox.Select (Item)


Parameter : Item = 5 : The text or index of the item to select.
Notes : Selects an item from the combo box listbox.

Jagan Mohan Julooru 73


Method : combobox.SetText (sText)
Parameter : sText = "abc" : The string to substitute.
Notes : Replaces the text in the combo box text field.

Method : combobox.VerifyContents (lsExpected)


Parameter : lsExpected = myList : The values you expect the list to have.
Notes : Verifies the contents of the combo box listbox.

Method : combobox.VerifyText (sText)


Parameter : sText : The expected text in the combo box text field.
Notes : Verifies the text in the combo box text field.

Method : combobox.VerifyValue (aExpected)


Parameter : aExpected = 5 : The index or text of the expected selection.
Notes : Verifies the selected combo box item.

property : lsContents
Notes : The contents of the combo box list (read only).

property : iItemCount
Notes : The number of items in the combo box list (read only).

property : iValue
Notes : The index of the selected combo box item.

property : sValue
Notes : The text of the combo box text field.

#**********************************************************************

Jagan Mohan Julooru 74


Class : Control

Method : sLabel = control.GetPriorStatic ([bRawMode])


Returns : sLabel : The returned label (a string).
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the label associated with the control.

Method : bHasFocus = control.HasFocus ()


Returns : bHasFocus : TRUE if has input focus, otherwise FALSE.
Notes : Tests whether the control has input focus.

Method : control.SetFocus ()
Notes : Gives focus to the control.

Method : control.VerifyFocus ()
Notes : Verifies that the control has input focus.

property : bHasFocus
Notes : Whether the control has input focus (read only).

#**********************************************************************

Class : CursorClass

Method : point = Cursor.GetPosition ()


Returns : point : A POINT with the x and y positions.
Notes : Returns the screen position of the mouse pointer.

Method : CurType = Cursor.GetType ()


Returns : CurType : The type of the cursor. CURSOR.
Notes : Returns the type of the current cursor.

Jagan Mohan Julooru 75


Method : bOfClass = object.IsOfClass (dClass [,bExact])
Returns : bOfClass : TRUE if object is of dClass or a child of dClass.
Parameter : dClass : The Class to test for (of type DATACLASS).
Parameter : bExact : If TRUE, returns exact match of dClass. (Optional)
Notes : Tests whether the object is of the specified Class.

Method : nSeconds = Cursor.Wait (Cursor, nTimeout [, nNoChange])


Returns : nSeconds : The seconds waited for the cursor.
Parameter : Cursor = "pointer" : The type of cursor to wait for. CURSOR.
Parameter : nTimeout = 5 : The time to wait for the cursor to change.
Parameter : nNoChange : How long the cursor must remain. (Optional)
Notes : Waits for the specified cursor and returns the elapsed time.

#**********************************************************************

Class : DesktopWin

Method : wActive = window.GetActive ()


Returns : wActive : The active window.
Notes : Returns the active window on the desktop.

Method : wFocus = GetFocus ()


Returns : wFocus : The returned control.
Notes : Returns the control with the input focus.

#**********************************************************************

Class : DialogBox

Method : dialogbox.Accept ()

Jagan Mohan Julooru 76


Notes : Closes the dialog box and accepts the values specified there.

Method : dialogbox.Dismiss ()
Notes : Closes the dialog box without accepting the values specified there.

Method : wButton = dialogbox.GetDefaultButton ()


Returns : wButton : The default pushbutton.
Notes : Returns the default pushbutton in the dialog box.

Method : dialogbox.Invoke ()
Notes : Invokes the dialog box, using the wInvoke variable in the declaration.

Method : dialogbox.VerifyDefaultButton (wButton)


Parameter : wButton : The expected default button.
Notes : Verifies the default button of the dialog box.

#**********************************************************************

Class : DynamicText

Method : sText = dynamictext.GetText ([iStartChar, iNumChars])


Returns : sText : The returned text (a string).
Parameter : iStartChar : The position of the first character. (Optional)
Parameter : iNumChars : The number of characters to get. (Optional)
Notes : Returns the text of the dynamic text.

Method : dynamictext.VerifyValue (sExpected)


Parameter : sExpected = "actual text" : The expected text.
Notes : Verifies the text of the dynamic text.

property : sValue

Jagan Mohan Julooru 77


Notes : The text in the dynamic text (read only).

#**********************************************************************

Class : ListBox

Method : listbox.BeginDrag (iButton, Item[, iShiftKeys])


Parameter : iButton : Mouse button to press (1 for left, 2 for right, 3 for
center).
Parameter : Item : Identifiable object. STRING or INTEGER.
Parameter : iShiftKeys : Keys to hold down during the drag : 1 is Alt, 2 is
Control, 4 is Shift. (Optional)
Notes : Presses a mouse button on an item in a list box and begins a drag operation.

Method : listbox.DoubleSelect (Item)


Parameter : Item = 3 : The text or index of the item to click.
Notes : Double-clicks an item in the listbox.

Method : listbox.EndDrag (Item)


Parameter : Item : Item to release. STRING or INTEGER.
Notes : Releases dragged item at a logical destination within a list box.

Method : listbox.ExtendSelect (Item)


Parameter : Item = 5 : The text or index of the item to select.
Notes : Selects a range of items by extending the selection in the listbox.

Method : iIndex = listbox.FindItem (sItem)


Returns : iIndex : The index of the item.
Parameter : sItem = "myItem" : The text of the item to find.
Notes : Returns the index of the specified item.

Jagan Mohan Julooru 78


Method : lsContents = listbox.GetContents ([bRawMode])
Returns : lsContents : The returned list of string.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the contents of the listbox.

Method : iCount = listbox.GetItemCount ()


Returns : iCount : The number of items.
Notes : Returns the number of items in the listbox.

Method : sText = listbox.GetItemText (iIndex [, bRawMode])


Returns : sText : The text of the item.
Parameter : iIndex = 5 : The index of the item to find.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the text of an item in the listbox.

Method : liIndices = listbox.GetMultiSelIndex ()


Returns : liIndices : The returned list of integer.
Notes : Returns the indices of the selected items in the listbox.

Method : lsText = listbox.GetMultiSelText ()


Returns : lsText : The returned list of string.
Notes : Returns the text of the selected items in the listbox.

Method : iIndex = listbox.GetSelIndex ()


Returns : iIndex : The returned integer index.
Notes : Returns the index of the selected item in the single-selection listbox.

Method : sText = listbox.GetSelText ()


Returns : sText : The returned string.
Notes : Returns the text of the selected item in the single-selection listbox.

Jagan Mohan Julooru 79


Method : bSupports = listbox.IsExtendSel ()
Returns : bSupports : TRUE if can extend selections, else FALSE.
Notes : Tests whether the listbox supports extended selections.

Method : bSupports = listbox.IsMultiSel ()


Returns : bSupports : TRUE if can select multiple, else FALSE.
Notes : Tests whether the listbox supports multiple selections.

Method : listbox.MultiSelect (Item)


Parameter : Item = 5 : The text or index of the item to select.
Notes : Selects an item in the multi-selection listbox.

Method : listbox.MultiUnselect (Item)


Parameter : Item = 5 : The text or index of the item to unselect.
Notes : Unselects an item in the multi-selection listbox.

Method : listbox.Select (Item)


Parameter : Item = 5 : The text or index of the item to select.
Notes : Selects an item from the listbox.

Method : listbox.SelectList (lItems)


Parameter : lItems = myList : The list of items to select.
Notes : Selects a list of items in the extend- or multi-selection listbox.

Method : listbox.SelectRange (StartItem, EndItem)


Parameter : StartItem = 1 : The text or index of the first item.
Parameter : EndItem = 3 : The text or index of the last item.
Notes : Selects a range of items in the extend-selection listbox.

Method : listbox.VerifyContents (lsExpected)


Parameter : lsExpected = myList : The values you expect the list to have.

Jagan Mohan Julooru 80


Notes : Verifies the contents of the listbox.

Method : listbox.VerifyValue (aExpected)


Parameter : aExpected = 5 : The text or index of the expected selection.
Notes : Verifies the selected item in the listbox.

property : lsContents
Notes : The contents of the listbox (read only).

property : bIsExtend
Notes : Whether the listbox supports extended selections (read only).

property : bIsMulti
Notes : Whether the listbox supports multiple selections (read only).

property : iItemCount
Notes : The number of items in the listbox (read only).

property : iValue
Notes : The index of the selected item in the single-selection listbox.

property : liValue
Notes : The indices of all selected items in the listbox (read only).

property : lsValue
Notes : The text of all selected items in the listbox (read only).

property : sValue
Notes : The text of the selected item in the single-selection listbox.

#**********************************************************************

Jagan Mohan Julooru 81


Class : ListView

Method : listview.BeginDrag (iButton, Item[, iShiftKeys])


Parameter : iButton : Mouse button to press (1 for left, 2 for right, 3 for
center).
Parameter : Item : Identifiable object. STRING or INTEGER.
Parameter : iShiftKeys : Keys to hold down during the drag : 1 is Alt, 2 is
Control, 4 is Shift. (Optional)
Notes : Presses a mouse button on an item in a listview and begins a drag operation.

Method : listview.DoubleSelect (Item)


Parameter : Item = 3 : The text or index of the item to click.
Notes : Double-clicks an item in the listview control.

Method : listview.EndDrag (Item)


Parameter : Item : Item to release. STRING or INTEGER.
Notes : Releases dragged item at a logical destination within a listview.

Method : listview.ExposeItem (Item)


Parameter : Item = 5 : The text or index of the item to expose.
Notes : Scrolls an item into view.

Method : listview.ExtendSelect (Item)


Parameter : Item = 5 : The text or index of the item to select.
Notes : Selects a range of items by extending the selection in the listview.

Method : iIndex = listview.FindItem (sItem)


Returns : iIndex : The index of the item.
Parameter : sItem = "myItem" : The text of the item to find.
Notes : Returns the index of the specified item.

Jagan Mohan Julooru 82


Method : iCount = listview.GetColumnCount ()
Returns : iCount : The number of columns.
Notes : Returns the number of report-view columns in the listview control.

Method : sName = listview.GetColumnName (iColumn)


Returns : sName : The name of the column.
Parameter : iColumn = 1 : The number of the column to get the name of.
Notes : Returns the name of a specified report-view column.

Method : lsContents = listview.GetContents ([iColumn, bRawMode])


Returns : lsContents : The returned list of string.
Parameter : iColumn : The colum to get the contents of. (Optional)
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the contents of the listview or a specific report-view column.

Method : iCount = listview.GetItemCount ()


Returns : iCount : The number of items.
Notes : Returns the number of items in the listview control.

Method : iIndex = listview.GetItemImageIndex (liItem)


Returns : iIndex : The index into the image list for list item's icon.
Parameter : liItem : Item in the listview. LISTITEM.
Notes : Returns the index into the image list for listviews that contain icons.

Method : iIndex = listview.GetItemImageState (liItem)


Returns : iIndex : The index into the image list for list item's icon.
Parameter : liItem : Item in the listview. LISTITEM.
Notes : Returns the state of the checkbox image icon for listviews.

Method : Rect = listview.GetItemRect (Item [, bIconRect, iColumn])

Jagan Mohan Julooru 83


Returns : Rect : The location the item.
Parameter : Item = "item" : The index of the item to get.
Parameter : bIconRect : TRUE to return the location of the item's icon.
(Optional)
Parameter : iColum : The column to get the rect of. (Optional)
Notes : Returns the location of a listview item's text or icon.

Method : sText = listview.GetItemText (iIndex [iColumn, bRawMode])


Returns : sText : The text of the item.
Parameter : iIndex = 5 : The index of the item to find.
Parameter : iColumn : The colum to get the text of. (Optional)
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the text of an item in the listview control.

Method : liIndices = listview.GetMultiSelIndex ()


Returns : liIndices : The returned list of integer.
Notes : Returns the indices of the selected items in the listview control.

Method : lsText = listview.GetMultiSelText ()


Returns : lsText : The returned list of string.
Notes : Returns the text of the selected items in the listview control.

Method : iIndex = listview.GetSelIndex ()


Returns : iIndex : The returned integer index.
Notes : Returns the index of the selected item in the single-selection listview.

Method : sText = listview.GetSelText ()


Returns : sText : The returned string.
Notes : Returns the text of the selected item in the single-selection listview.

Method : sTitle = listview.GetTitle ()

Jagan Mohan Julooru 84


Returns : sTitle : The returned string.
Notes : Returns the title above the report-view display of a listview control.

Method : lvView = listview.GetView ()


Returns : lvView : The view.
Notes : Returns the name of the current view of a listview.

Method : bSupports = listview.IsExtendSel ()


Returns : bSupports : TRUE if can extend selections, else FALSE.
Notes : Tests whether the listview supports extended selections.

Method : bSupports = listview.IsMultiSel ()


Returns : bSupports : TRUE if can select multiple, else FALSE.
Notes : Tests whether the listview supports multiple selections.

Method : listview.MultiSelect (Item)


Parameter : Item = 5 : The text or index of the item to select.
Notes : Selects an item in the multi-selection listview control.

Method : listview.MultiUnselect (Item)


Parameter : Item = 5 : The text or index of the item to unselect.
Notes : Unselects an item in the multi-selection listview control.

Method : listview.PressItem (Item [, iButton, iXoffset, iYoffset])


Parameter : Item = 5 : The text or index of the item to press on.
Parameter : iButton : The mouse button to press. (Optional)
Parameter : iXpos : The horizontal offset. (Optional)
Parameter : iYpos : The vertical offset. (Optional)
Notes : Presses the mouse on an item (to start a drag & drop).

Method : listview.ReleaseItem (Item [, iButton, iXpos, iYpos])

Jagan Mohan Julooru 85


Parameter : Item = 5 : The text or index of the item to release over.
Parameter : iButton : The mouse button to release. (Optional)
Parameter : iXpos : The horizontal offset. (Optional)
Parameter : iYpos : The vertical offset. (Optional)
Notes : Releases the mouse over an item (to finish a drag & drop).

Method : listview.Select (Item)


Parameter : Item = 5 : The text or index of the item to select.
Notes : Selects an item from the listview control.

Method : listview.SelectList (lItems)


Parameter : lItems = myList : The list of items to select.
Notes : Selects a list of items in the extend- or multi-selection listview.

Method : listview.SelectRange (StartItem, EndItem)


Parameter : StartItem = 1 : The text or index of the first item.
Parameter : EndItem = 3 : The text or index of the last item.
Notes : Selects a range of items in the extend-selection listview.

Method : listview.SelectSubItem (Item, iColumn)


Parameter : Item = "Item 5" : The subitem to select. STRING or INTEGER
Parameter : iColumn : The column position of the subitem (Optional)
Notes : Selects a subitem in the listview (OS/2 only).

Method : listview.VerifyContents (lsExpected)


Parameter : lsExpected = myList : The values you expect the list to have.
Notes : Verifies the contents of the listview control.

Method : listview.VerifyValue (aExpected)


Parameter : aExpected = 5 : The text or index of the expected selection.
Notes : Verifies the selected item in the listview control.

Jagan Mohan Julooru 86


property : lsContents
Notes : The contents of the listview (read only).

property : bIsExtend
Notes : Whether the listview supports extended selections (read only).

property : bIsMulti
Notes : Whether the listview supports multiple selections (read only).

property : iItemCount
Notes : The number of items in the listview (read only).

property : iValue
Notes : The index of the selected item in the single-selection listview.

property : liValue
Notes : The indices of all selected items in the listview (read only).

property : lsValue
Notes : The text of all selected items in the listview (read only).

property : sValue
Notes : The text of the selected item in the single-selection listview.

#**********************************************************************

Class : MainWin

Method : mainwin.CloseWindows ([bTrace])


Parameter : bTrace : TRUE to log of all windows closed. (Optional)

Jagan Mohan Julooru 87


Notes : Closes all windows of the application except the main window.

Method : mainwin.Exit ()
Notes : Terminates the application, closing all windows.

Method : wActive = mainwin.GetActive ()


Returns : wActive : The active window.
Notes : Returns the active window in the application.

Method : lwWindows = mainwin.GetCloseWindows ()


Returns : lwWindows : The list of windows to close.
Notes : Returns the windows that must close to return the application to base state.

Method : wNext = mainwin.GetNextCloseWindow ()


Returns : wNext : The next window to close.
Notes : Returns the next window that the Close Method will close.

Method : mainwin.Invoke ()
Notes : Invokes the application, using the sCmdLine variable in the declaration.

Method : mainwin.Start (sCmdLine)


Parameter : sCmdLine = "textedit.exe" : The command for running the application.
Notes : Invokes the application and waits for the main window to appear.

#**********************************************************************
Class : Menu

Method : iCount = menu.GetItemCount ()


Returns : iCount : The number of items.
Notes : Returns the number of items in the menu.

Jagan Mohan Julooru 88


Method : menu.Pick ()
Notes : Selects the menu.

Method : menu.TearOff ([iXpos, iYpos])


Parameter : iXpos : The x-coordinate of the grab point. (Optional)
Parameter : iYpos : The y-coordinate of the grab point. (Optional)
Notes : Tears off the menu.

Method : menu.VerifyContents (lsExpected)


Parameter : lsExpected = myList : The expected values (a list of string).
Notes : Verifies the contents of the menu.

property : iItemCount
Notes : The number of items in the menu (read only).

#**********************************************************************

Class : MenuItem

Method : menuitem.Check ()
Notes : Checks the menu item.

Method : bCheckState = menuitem.IsChecked ()


Returns : bCheckState : TRUE if checked, otherwise FALSE.
Notes : Tests whether the menu item is checked.

Method : menuitem.Pick ()
Notes : Picks the menu item.

Method : menuitem.Uncheck ()
Notes : Unchecks the menu item.

Jagan Mohan Julooru 89


Method : menuitem.VerifyChecked (bChecked)
Parameter : bChecked = TRUE : TRUE for checked, FALSE for unchecked.
Notes : Verifies the checked state of the menuitem.

property : bChecked
Notes : Whether the menu item is checked (read only).

#**********************************************************************

Class : MoveableWin

Method : window.Close ([bCloseConfirm, bSetActive])


Parameter : bCloseConfirm : TRUE to close confirmation boxes. (Optional)
Parameter : bSetActive : TRUE to set window active before closing. (Optional)
Notes : Closes the window.

Method : wInput = window.GetFocus ()


Returns : wInput : The window with the focus.
Notes : Returns the control with the input focus.

Method : State = window.GetState ()


Returns : State : WS_NORMAL, WS_MAXIMIZED, or
WS_MINIMIZED.
Notes : Returns the state of the window (a WINSTATE).

Method : window.Maximize ()
Notes : Maximizes the window.

Method : window.Minimize ()
Notes : Iconifies the window.

Jagan Mohan Julooru 90


Method : window.Move (iXpos, iYpos)
Parameter : iXpos = 100: The new horizontal position.
Parameter : iYpos = 100: The new vertical position.
Notes : Moves the window.

Method : window.Restore ()
Notes : Restores the window to its previous size.

Method : window.SetActive ()
Notes : Makes the window active.

Method : window.Size (iWidth, iHeight)


Parameter : iWidth = 35 : The new width of the window (in pixels).
Parameter : iHeight = 50 : The new height of the window (in pixels).
Notes : Resizes the window.

Method : window.VerifyCaption (sCaption)


Parameter : sCaption : The expected caption.
Notes : Verifies the caption of the window.

Method : window.VerifyFocus (wFocus)


Parameter : wFocus : The control expected to have the input focus.
Notes : Verifies the control which has input focus.

Method : window.VerifyContents (lsContents)


Parameter : lsContents : A list of string with the expected contents.
Notes : Verifies the contents of the window.

#**********************************************************************

Jagan Mohan Julooru 91


Class : PageList

Method : iPage = pagelist.FindPage (sPage)


Returns : iPage : The number of the specified page.
Parameter : sPage = "general" : The page to find.
Notes : Returns the number of the specified page.

Method : lsPages = pagelist.GetContents ([bRawMode])


Returns : lsPages : The list of pages in the PageList. LIST OF STRING.
Parameter : bRawMode : TRUE to include platform-specific information.
(Optional)
Notes : Returns the list of all the pages in the pagelist.

Method : iCount = pagelist.GetPageCount ()


Returns : iCount : The number of pages in the PageList.
Notes : Returns the number of pages in a PageList.

Method : sName = pagelist.GetPageName (iIndex [, bRawMode])


Returns : sName : The name of the specified page.
Parameter : iIndex = 5 : The index of the page to get the name of.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the name of the specified page.

Method : sText = pagelist.GetStatusLine ()


Returns : sText : The text of the status line.
Notes : Returns the text of a PageList's status line.

Method : iPage = pagelist.GetSelIndex ()


Returns : iPage : The index of the active page.
Notes : Returns the index of the active page.

Jagan Mohan Julooru 92


Method : sPage = pagelist.GetSelText ()
Returns : sPage : The name of the active page.
Notes : Returns the name of the active page.

Method : sPage = pagelist.HasSubPages ()


Returns : bHasThem : TRUE if it has sub-pages.
Notes : Returns TRUE if the PageList has sub-pages.

Method : pagelist.Select (liPage)


Parameter : liPage = "general" : The page to set active. (a LISTITEM)
Notes : Selects a page in a PageList control (makes it active).

Method : pagelist.VerifyContents (lsExpected)


Parameter : lsExpected = myList : A list of string with the expected values.
Notes : Verifies the contents (page list) of the PageList.

Method : pagelist.VerifyValue (aExpected)


Parameter : aExpected = 5 : The name or index of the expected page.
Notes : Verifies the active page in the PageList.

property : bHasSubPages
Notes : TRUE if the PageList has sub-pages (read only).

property : lsContents
Notes : The contents of the PageList (read only).

property : iPageCount
Notes : The number of pages in the PageList (read only).

property : iValue
Notes : The index of the active page in the PageList.

Jagan Mohan Julooru 93


property : sValue
Notes : The name of the active page in the PageList.

#**********************************************************************

Class : TreeView

Method : treeview.BeginDrag (iButton, Item[, iShiftKeys])


Parameter : iButton : Mouse button to press (1 for left, 2 for right, 3 for
center).
Parameter : Item : Identifiable object. STRING or INTEGER.
Parameter : iShiftKeys : Keys to hold down during the drag : 1 is Alt, 2 is
Control, 4 is Shift. (Optional)
Notes : Presses a mouse button on an item in a treeview and begins a drag operation.

Method : treeview.Collapse (Item)


Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Collapses the specified treeview item.

Method : treeview.DoubleSelect (Item)


Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Double-clicks on an item from the treeview control.

Method : treeview.EndDrag (Item)


Parameter : Item : Item to release. STRING or INTEGER.
Notes : Releases dragged item at a logical destination within a treeview.

Method : treeview.Expand (sItem)


Parameter : sItem = "/item/sub-item" : The path or index of the item.
Notes : Expands the specified treeview item.

Jagan Mohan Julooru 94


Method : treeview.ExposeItem (sItem)
Parameter : sItem = "/item/sub-item" : The path or index of the item.
Notes : Scrolls an item into view.

Method : treeview.ExtendSelect (Item)


Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Selects a range of items by extending the selection in the treeview control.

Method : iIndex = treeview.FindItem (sItem)


Returns : iIndex : The index of the item.
Parameter : sItem = "/item/sub-item" : The path of the item to find.
Notes : Returns the index of the specified item.

Method : lsContents = treeview.GetContents ([bRawMode])


Returns : lsContents : The contents of the TreeView.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the contents of the treeview control.

Method : iCount = treeview.GetItemCount ([bAllItems])


Returns : iCount : The item count of the TreeView
Parameter : bAllItems : TRUE to include collapsed branches. (Optional)
Notes : Returns the number of items in the treeview control.

Method : iIndex = treeview.GetItemImageIndex (liItem)


Returns : iIndex : The index into the image list for list item's icon.
Parameter : liItem : Item in the treeview. LISTITEM.
Notes : Returns the index into the image list for treeviews that contain icons.

Method : iIndex = treeview.GetItemImageState (liItem)


Returns : iIndex : The index into the image list for list item's icon.

Jagan Mohan Julooru 95


Parameter : liItem : Item in the treeview. LISTITEM.
Notes : Returns the state of the checkbox image icon for treeviews.

Method : iLevel = treeview.GetItemLevel (Item)


Returns : iLevel : The level of the item.
Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Returns the level of the item.

Method : Rect = treeview.GetItemRect (Item [, bIconRect])


Returns : Rect : The rectangle of the item text or icon.
Parameter : Item = "/item/sub-item" : The path or index of the item.
Parameter : bIconRect : TRUE to return the rectangle of the icon.
Notes : Returns the rectangle of the item text or icon.

Method : sText = treeview.GetItemText (iIndex [, bRawMode])


Returns : sText : The text of the item.
Parameter : iIndex = 3 : The index of the item to get the text of.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the text (path) of an item in the treeview control.

Method : liIndices = treeview.GetMultiSelIndex ()


Returns : liIndices : The returned list of integer.
Notes : Returns the indices of the selected items in the treeview control.

Method : lsText = treeview.GetMultiSelText ()


Returns : lsText : The returned list of string.
Notes : Returns the text (path) of each selected item in the treeview control.

Method : iIndex = treeview.GetSelIndex ()


Returns : iIndex : The index of the selected item.
Notes : Returns the index of the selected item in the treeview control.

Jagan Mohan Julooru 96


Method : sText = treeview.GetSelText ()
Returns : sText : The selected text.
Notes : Returns the text of the selected item in the treeview control.

Method : iCount = treeview.GetSubItemCount (Item)


Returns : iCount : The sub-item count.
Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Returns the number of sub-items (children) of the item.

Method : lsItems = treeview.GetSubItems (Item)


Returns : lsItems : The list of sub-items.
Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Returns the sub-items (children) of the item.

Method : view = treeview.GetView ()


Returns : view : The current view of the treeview control.
Notes : Returns the name of the view that the treeview control is using.

Method : bSupports = treeview.IsExtendSel ()


Returns : bSupports : TRUE if can extend selections, else FALSE.
Notes : Tests whether the treeview control supports extended selections.

Method : bEditable = treeview.IsItemEditable (Item)


Returns : bEditable : TRUE if the item can be edited.
Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Tests whether a treeview control item can be edited.

Method : bEditable = treeview.IsItemExpandable (Item)


Returns : bEditable : TRUE if the item can be expanded.
Parameter : Item = "/item/sub-item" : The path or index of the item.

Jagan Mohan Julooru 97


Notes : Tests whether a treeview control item can be expanded.

Method : bEditable = treeview.IsItemExpanded (Item)


Returns : bEditable : TRUE if the item is currently expanded.
Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Tests whether a treeview control item is currently expanded.

Method : bSupports = treeview.IsMultiSel ()


Returns : bSupports : TRUE if can select multiple, else FALSE.
Notes : Tests whether the treeview control supports multiple selections.

Method : treeview.MultiSelect (Item)


Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Selects an item in the multi-selection treeview control.

Method : treeview.MultiUnselect (Item)


Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Unselects an item in the multi-selection treeview control.

Method : treeview.PressItem (Item [, iButton, iXoffset, iYoffset])


Parameter : Item = "/item/sub-item" : The path or index of the item.
Parameter : iButton : The mouse button to press. (Optional)
Parameter : iXpos : The horizontal offset. (Optional)
Parameter : iYpos : The vertical offset. (Optional)
Notes : Presses the mouse on an item (to start a drag & drop).

Method : treeview.ReleaseItem (Item [, iButton, iXpos, iYpos])


Parameter : Item = "/item/sub-item" : The text or index of the item.
Parameter : iButton : The mouse button to release. (Optional)
Parameter : iXpos : The horizontal offset. (Optional)
Parameter : iYpos : The vertical offset. (Optional)

Jagan Mohan Julooru 98


Notes : Releases the mouse over an item (to finish a drag & drop).

Method : treeview.Select (Item)


Parameter : Item = "/item/sub-item" : The path or index of the item.
Notes : Selects an item from the treeview control.

Method : treeview.SelectList (lsItems)


Parameter : lItems = myList : The list of items to select.
Notes : Selects a list of items in the extend- or multi-selection treeview control.

Method : treeview.VerifyContents (lsExpected)


Parameter : lsExpected = myList : A list of string with the expected values.
Notes : Verifies the contents of the treeview control.

Method : treeview.VerifyValue (aExpected)


Parameter : aExpected = 5 : The text or index of the expected selection.
Notes : Verifies the selected item in the treeview control.

property : lsContents
Notes : The contents of the TreeView (read only).

property : iItemCount
Notes : The number of items in the treeview control (read only).

property : iValue
Notes : The index of the selected treeview item.

property : sValue
Notes : The text of the selected treeview item.

#**********************************************************************

Jagan Mohan Julooru 99


Class : PopupList

Method : iIndex = popup.FindItem (sItem)


Returns : iIndex : The index of the item.
Parameter : sItem = "myItem" : The text of the item to find.
Notes : Returns the index of the specified item.

Method : lsContents = popup.GetContents ([bRawMode])


Returns : lsContents : The returned list of string.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the contents of the popup list.

Method : iCount = popup.GetItemCount ()


Returns : iCount : The returned integer.
Notes : Returns the number of items in the popup list.

Method : sText = popup.GetItemText (iIndex [, bRawMode])


Returns : sText : The text of the item.
Parameter : iIndex = 3 : The index of the item to find.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the text of an item in the popup list.

Method : iIndex = popup.GetSelIndex ()


Returns : iIndex : The index of the selected item.
Notes : Returns the index of the selected item in the popup list.

Method : sText = popup.GetSelText ()


Returns : sText : The selected text.
Notes : Returns the text of the selected item in the popup list.

Jagan Mohan Julooru 100


Method : popup.Select (Item)
Parameter : Item = 5 : The text or index of the item to select.
Notes : Selects an item from the popup list.

Method : popup.VerifyContents (lsExpected)


Parameter : lsExpected = myList : A list of string with the expected values.
Notes : Verifies the contents of the popup list.

Method : popup.VerifyValue (aExpected)


Parameter : aExpected = 5 : The text or index of the expected selection.
Notes : Verifies the selected item in the popup list.

property : lsContents
Notes : The contents of the popup list (read only).

property : iItemCount
Notes : The number of items in the popup list (read only).

property : iValue
Notes : The index of the selected popup list item.

property : sValue
Notes : The text of the selected popup list item.

#**********************************************************************

Class : PushButton

Method : pushbutton.Click ([iButton, iXpos, iYpos, bRawEvent])


Parameter : iButton : The number of the button to click. (Optional)
Parameter : iXpos : The horizontal coordinate to click. (Optional)

Jagan Mohan Julooru 101


Parameter : iYpos : The vertical coordinate to click. (Optional)
Parameter : bRawEvent : (32-bit Windows only) Specifies playback mechanism.
(Optional)
Notes : Clicks a mouse button on the pushbutton.

Method : bPressed = pushbutton.IsIndeterminate ()


Returns : bState : TRUE if indeterminate, otherwise FALSE.
Notes : Tests whether a toolbar button is indeterminate.

Method : bPressed = pushbutton.IsPressed ()


Returns : bState : TRUE if pressed, otherwise FALSE.
Notes : Tests whether a toolbar button is pressed.

#**********************************************************************

Class : RadioList

Method : iIndex = radiolist.FindItem (sItem)


Returns : iIndex : The index of the item.
Parameter : sItem = "myItem" : The item to find.
Notes : Returns the index of the specified item.

Method : lsContents = radiolist.GetContents ([bRawMode])


Returns : lsContents : The returned list of string.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the contents of the radio list.

Method : iCount = radiolist.GetItemCount ()


Returns : iCount : The number of items.
Notes : Returns the number of items in the radio list.

Jagan Mohan Julooru 102


Method : sText = radiolist.GetItemText (iIndex [, bRawMode])
Returns : sText : The text of the item.
Parameter : iIndex = 3 : The index of the item to find.
Parameter : bRawMode : TRUE to include extra characters. (Optional)
Notes : Returns the text of an item in the radio list.

Method : iIndex = radiolist.GetSelIndex ()


Returns : iIndex : The index of the item.
Notes : Returns the index of the selected item in the radio list.

Method : sText = radiolist.GetSelText ()


Returns : sText : The text of the item.
Notes : Returns the text of the selected item in the radio list.

Method : radiolist.Select (Item)


Parameter : Item = 3 : The text or index of the item to select.
Notes : Selects an item from the radio list.

Method : radiolist.VerifyContents (lsExpected)


Parameter : lsExpected = myList : The expected values of the radio list.
Notes : Verifies the contents of the radio list.

Method : radiolist.VerifyValue (Item)


Parameter : Item = 5 : The index or text of the expected selection.
Notes : Verifies the selected item in the radio list.

property : lsContents
Notes : The text of the radio list items (read only).

property : iItemCount
Notes : The number of items in the radio list (read only).

Jagan Mohan Julooru 103


property : iValue
Notes : The index of the selected radio list item.

property : sValue
Notes : The text of the selected radio list item.

#**********************************************************************

Class : Scale

Method : nPos = scale.GetPosition ()


Returns : nPos : The current position (integer or real).
Notes : Returns the position of the scale.

Method : Range = scale.GetRange ()


Returns : Range : The range of the scale (an SCLRANGE).
Notes : Returns the minimum and maximum positions of the scale.

Method : scale.SetPosition (nPosition)


Parameter : nPosition = 30 : The position to move to (integer or real).
Notes : Sets the position of the scale.

Method : scale.SetToMax ()
Notes : Sets the scale to its maximum position.

Method : scale.SetToMin ()
Notes : Sets the scale to its minimum position.

Method : scale.VerifyValue (nExpected)


Parameter : nExpected = 15 : The expected position (integer or real).

Jagan Mohan Julooru 104


Notes : Verifies the position of the scale.

property : Range
Notes : The range of the scale (read only).

property : iValue
Notes : The integer position of the scale.

property : rValue
Notes : The real position of the scale.

#**********************************************************************

Class : ScrollBar

Method : iPageSize = scrollbar.GetPageSize ()


Returns : iPageSize : The page size (an integer).
Notes : Returns the page size of the scrollbar.

Method : iPos = scrollbar.GetPosition ()


Returns : iPos : The current position (an integer).
Notes : Returns the position of the scrollbar.

Method : Range = scrollbar.GetRange ()


Returns : Range : The range of the scrollbar (an SBRANGE).
Notes : Returns the minimum and maximum positions of the scrollbar.

Method : scrollbar.ScrollByLine (iAmount)


Parameter : iAmount = 10 : The direction and number of lines to scroll.
Notes : Scrolls the scrollbar line by line.

Jagan Mohan Julooru 105


Method : scrollbar.ScrollByPage (iAmount)
Parameter : iAmount = 2 : The direction and number of pages to scroll.
Notes : Scrolls the scrollbar page by page.

Method : scrollbar.ScrollToMax ()
Notes : Scrolls the scrollbar to its maximum position.

Method : scrollbar.ScrollToMin ()
Notes : Scrolls the scrollbar to its minimum position.

Method : scrollbar.SetPosition (iPosition)


Parameter : iPosition = 15 : The position to move to (an integer).
Notes : Sets the position of the scrollbar.

Method : nTime = scrollbar.TimeAutoScroll (iAmount, nTimeout)


Returns : nTime : The seconds the operation took (a real number).
Parameter : iAmount = 10 : The direction and number of lines to scroll.
Parameter : nTimeout = 2 : The maximum seconds to allow.
Notes : Returns the seconds taken to repeat a scrolling operation.

Method : scrollbar.VerifyRange (Range)


Parameter : Range : The expected range (a SBRANGE).
Notes : Verifies the range of the scrollbar.

Method : scrollbar.VerifyPageSize (iExpPageSz)


Parameter : iExpPageSz : The expected page size (an integer).
Notes : Verifies the page size of the scrollbar.

Method : scrollbar.VerifyValue (iExpected)


Parameter : iExpected = 15 : The expected position (an integer).
Notes : Verifies the position of the scrollbar.

Jagan Mohan Julooru 106


property : iPageSize
Notes : The page size of the scrollbar (read only).

property : Range
Notes : The range of the scrollbar (read only).

property : iValue
Notes : The position of the scrollbar.

#**********************************************************************

Class : StaticText

Method : sText = statictext.GetText ([iStartChar, iNumChars])


Returns : sText : The returned text (a string).
Parameter : iStartChar : The position of the first character. (Optional)
Parameter : iNumChars : The number of characters to get. (Optional)
Notes : Returns the text of the static text.

Method : statictext.VerifyValue (sExpected)


Parameter : sExpected = "actual text" : The expected text.
Notes : Verifies the text of the static text.

property : sValue
Notes : The text in the static text (read only).

#**********************************************************************

Class : TextField

Jagan Mohan Julooru 107


Method : textfield.ClearText ()
Notes : Removes all text from the text field.

Method : cRGBValues = textfield.GetBackgroundColor ()


Returns : cRGBValues : A record with fields for red, green, and blue.
COLOR.
Notes : Returns a text field's background color in a record, with fields for red, green,
and blue.

Method : sName = textfield.GetFontName ([iLine, iCol])


Returns : sName : The name of the font in use (STRING).
Parameter : iLine : The line of the character to get. (Optional)
Parameter : iCol : The column of the character to get. (Optional)
Notes : Returns the font of a character in a rich text field.

Method : iSize = textfield.GetFontSize ([iLine, iCol])


Returns : iSize : The size of the font in use (INTEGER).
Parameter : iLine : The line of the character to get. (Optional)
Parameter : iCol : The column of the character to get. (Optional)
Notes : Returns size of a character in a rich text field.

Method : lsText = textfield.GetMultiSelText ()


Returns : lsText : The text of each selected line.
Notes : Returns the selected lines in the multi-line text field.

Method : lsText = textfield.GetMultiText ([iStartLine, iNumLines])


Returns : lsText : The text in the specified portion.
Parameter : iStartLine : The first line to return. (Optional)
Parameter : iNumLines : The number of lines to return. (Optional)
Notes : Returns the specified lines of the multi-line text field.

Jagan Mohan Julooru 108


Method : tPos.GetPosition ()
Parameter : tPos : A TEXTPOS with the current line and column.
Notes : Returns the line and column position of the insertion point.

Method : trSelection = textfield.GetSelRange ()


Returns : trSelection : The selected range (a TEXTRANGE).
Notes : Returns the selected range of the text field.

Method : sText = textfield.GetSelText ()


Returns : sText : The returned text (a string).
Notes : Returns the text in the single-line text field.

Method : sText = textfield.GetText ([iStartChar, iNumChars])


Returns : sText : The returned text (a string).
Parameter : iStartChar : The position of the first character. (Optional)
Parameter : iNumChars : The number of characters to get. (Optional)
Notes : Returns text from the text field.

Method : bIsBold = textfield.IsBold ([iLine, iCol])


Returns : bIsBold : TRUE if bold, otherwise FALSE.
Parameter : iLine : The line of the character to test. (Optional)
Parameter : iCol : The column of the character to test. (Optional)
Notes : Tests whether a character is bold in a rich text field.

Method : bIsItalic = textfield.IsItalic ([iLine, iCol])


Returns : bIsItalic : TRUE if italic, otherwise FALSE.
Parameter : iLine : The line of the character to test. (Optional)
Parameter : iCol : The column of the character to test. (Optional)
Notes : Tests whether a character is italic in a rich text field.

Method : bIsMulti = textfield.IsMultiText ()

Jagan Mohan Julooru 109


Returns : bIsMulti : TRUE if multi-line, otherwise FALSE.
Notes : Tests whether the text field is a multi-line text field.

Method : bIsRich = textfield.IsRichText ()


Returns : bIsRich : TRUE if rich text, otherwise FALSE.
Notes : Tests whether the text field supports rich text.

Method : bIsUnderline = textfield.IsUnderline ([iLine, iCol])


Returns : bIsUnderline : TRUE if underlined, otherwise FALSE.
Parameter : iLine : The line of the character to test. (Optional)
Parameter : iCol : The column of the character to test. (Optional)
Notes : Tests whether a character is underlined in a rich text field.

Method : textfield.SetMultiText (lsText [, iStartLine, iNumLines])


Parameter : lsText = myList : The list of string to substitute.
Parameter : iStartLine : The line at which to start. (Optional)
Parameter : iNumLines : The number of lines to substitute. (Optional)
Notes : Substitutes all or part of the lines in the multi-line text field.

Method : textfield.SetPosition (iLine, iCol)


Parameter : iLine = 1 : The line to move to.
Parameter : iCol = 5 : The column to move to.
Notes : Sets the insertion point in the text field.

Method : textfield.SetSelRange (iStartLine, iStartCol, iEndLine, iEndCol)


Parameter : iStartLine = 1 : The line at which to start.
Parameter : iStartCol = 1 : The column at which to start.
Parameter : iEndLine = 5 : The line at which to end.
Parameter : iEndCol = 10 : The column at which to end.
Notes : Selects the specified range of the text field.

Jagan Mohan Julooru 110


Method : textfield.SetText (sText [, iStartChar, iNumChars])
Parameter : sText = "abc" : The string to substitute.
Parameter : iStartChar : The position at which to start. (Optional)
Parameter : iNumChars : The number of characters to substitute. (Optional)
Notes : Substitutes new text for all or part of the text in the text field.

Method : textfield.VerifySelRange (trExpected)


Parameter : trExpected = myRange : The expected selected (a TEXTRANGE).
Notes : Verifies the selected range of the text field.

Method : textfield.VerifySelText (aExpected)


Parameter : aExpected : The string or list of string you expect selected.
Notes : Verifies the selected text of the text field.

Method : textfield.VerifyPosition (ExpectedPos)


Parameter : ExpectedPos : The expected caret position (a TEXTPOS).
Notes : Verifies the caret position of the text field.

Method : textfield.VerifyValue (aExpected)


Parameter : aExpected = "myText" : The string or list of string you expect.
Notes : Verifies the text of the text field.

property : bIsMulti
Notes : Whether the text field is a multi-line text field (read only).

property : lsValue
Notes : The text in the multi-line text field.

property : sValue
Notes : The text in the single-line text field.

Jagan Mohan Julooru 111


#**********************************************************************

Class : UpDown

Method : updown.Decrement ([iSteps])


Parameter : iSteps : The number of steps to decrement (optional).
Notes : Clicks on the down or left arrow of the updown control.

Method : iPos = updown.GetPosition ()


Returns : iPos : The current position (an integer).
Notes : Returns the position of the updown control.

Method : Range = updown.GetRange ()


Returns : Range : The range of the updown (an SBRANGE).
Notes : Returns the minimum and maximum positions of the updown control.

Method : updown.Increment ([iSteps])


Parameter : iSteps : The number of steps to increment (optional).
Notes : Clicks on the up or right arrow of the updown control.

Method : updown.SetPosition (iPosition)


Parameter : iPosition = 15 : The position to move to (an integer).
Notes : Sets the position of the updown control.

Method : updown.SetText (sText)


Parameter : sText : The text to set.
Notes : Sets the text of the textfield which is managed by an UpDown control.

Method : updown.SetToMax ()
Notes : Increments the updown control until it reaches its maximum value.

Jagan Mohan Julooru 112


Method : updown.SetToMin ()
Notes : Decrements the updown control until it reaches its minimum value.

Method : updown.VerifyRange (Range)


Parameter : Range : The expected range (a SBRANGE).
Notes : Verifies the range of the scrollbar.

Method : updown.VerifyValue (iExpected)


Parameter : iExpected = 15 : The expected position (an integer).
Notes : Verifies the position of the updown control.

property : Range
Notes : The range of the updown control (read only).

property : iValue
Notes : The position of the updown control.

property : sValue
Notes : The current text of the updown control.

#**********************************************************************

Class : GuptaTable

Method : table.ClickCell (Cell)


Parameter : Cell = {row, col} : The cell to click on.
Notes : Makes the cell visible, then clicks in its center.

Method : table.EnterCellText (Cell, sText)


Parameter : Cell = {row, col} : The cell to enter text into.
Parameter : sText = "myText" : The text to enter into the cell.

Jagan Mohan Julooru 113


Notes : Enters text via the user-interface.

Method : Cell = table.FindCell (sText [, iStartRow])


Returns : Cell : The cell with the text.
Parameter : sText = "myText" : The text to find.
Parameter : iStartRow : The row at which to start searching. (Optional)
Notes : Returns the cell containing the specified text.

Method : Column = table.FindColumn (sText, iRowToCheck)


Returns : Column : The returned column (0 if not found).
Parameter : sText = "myText" : The text to find.
Parameter : iRowToCheck = 1 : The row to look in.
Notes : Returns the column containing the specified text.

Method : iRow = table.FindRow (sText, ColumnToCheck)


Returns : iRow : The returned row.
Parameter : sText = "mytext" : The text to find.
Parameter : ColumnToCheck = 1 : The column to look in.
Notes : Returns the row containing the specified text.

Method : Rect = table.GetCellRect (Cell)


Returns : Rect : The coordinates and dimensions of the cell.
Parameter : Cell = {row, col} : The cell to get the rect of.
Notes : Returns the table-relative pixel geometry of the specified cell.

Method : sCellText = table.GetCellText (Cell)


Returns : sCellText : The text in the cell.
Parameter : Cell = {row, col} : The cell to read.
Notes : Returns the text in the specified cell.

Method : iCount = table.GetColumnCount ()

Jagan Mohan Julooru 114


Returns : iCount : The number of columns in the table.
Notes : Returns the number of columns in the table.

Method : sName = table.GetColumnName (Column)


Returns : sName : The returned name.
Parameter : Column = 1 : The number or name of the column to read.
Notes : Returns the title of the specified column.

Method : lsNames = table.GetColumnNames ()


Returns : lsNames : The returned names.
Notes : Returns the names of all columns in the table.

Method : lsColumnText = table.GetColumnText (Column)


Returns : lsColumnText : The text in the column (LIST OF STRING).
Parameter : Column = 1 : The number or name of the column to read.
Notes : Returns the text in the specified column.

Method : lsContents = table.GetContents ()


Returns : lsContents : The contents of each cell (LIST OF LIST OF STRING).
Notes : Returns the contents of each cell in the table.

Method : CurrentCell = table.GetCurrentCell ()


Returns : CurrentCell : The current table cell.
Notes : Returns the current cell in the table.

Method : iCurrentCol = table.GetCurrentColumn ()


Returns : iCurrentCol : The number of the current column.
Notes : Returns the number of the current column in the table.

Method : iCurrentRow = table.GetCurrentRow ()


Returns : iCurrentRow : The number of the current row.

Jagan Mohan Julooru 115


Notes : Returns the number of the current row in the table.

Method : LastCell = table.GetDimensions ()


Returns : LastCell : The last cell in the table.
Notes : Returns the last cell in the table.

Method : lsRangeText = table.GetRangeText (TopLeftCell,


BottomRightCell)
Returns : lsRangeText : The returned text (LIST OF LIST OF STRING).
Parameter : TopLeftCell = {row, col} : The top-left cell of the range.
Parameter : BottomRightCell = {row, col} : The bottom-right cell of the range.
Notes : Returns the text in the specified range of the table.

Method : iRowCount = table.GetRowCount ()


Returns : iRowCount : The number of rows in the table.
Notes : Returns the number of rows in the table.

Method : lsRowText = table.GetRowText (iRow)


Returns : lsRowText : The returned text (LIST OF STRING).
Parameter : iRow = 1 : The number of the row to read.
Notes : Returns the text from a single table row.

Method : bCellStatus = table.IsEmpty (Cell)


Returns : bCellStatus : TRUE if cell is empty, otherwise FALSE.
Parameter : Cell = {row, col} : The cell to check.
Notes : Tests whether the cell is empty.

Method : table.PrintCellText (Cell)


Parameter : Cell = {row, col} : The cell to print.
Notes : Prints the cell text to the results file.

Jagan Mohan Julooru 116


Method : table.PrintColumnText (Column)
Parameter : Column = 1 : The name or number of the column to print.
Notes : Prints the column text to the results file.

Method : table.PrintContents ()
Notes : Prints the contents of the entire table to the results file.

Method : table.PrintRangeText (lsText)


Parameter : lsText = myList : The range to print (LIST OF LIST OF STRING).
Notes : Prints the contents of the specified range to the results file.

Method : table.PrintRowText (iRow)


Parameter : iRow = 1 : The number of the row to print.
Notes : Prints the row text to the results file.

Method : table.SetCellText (Cell, sToSet)


Parameter : Cell = {row, col} : The cell to set.
Parameter : sToSet = "mytext" : The value to put in the cell.
Notes : Sets the text of the specified cell.

Method : table.SetColumnName (Column, sToSet)


Parameter : Column = 1 : The number or name of the column to modify.
Parameter : sToSet = "Data" : The name to assign to the column.
Notes : Sets the name of a column.

Method : table.SetColumnText (Column, lsColumnText)


Parameter : Column = 1 : The number or name of the column to modify.
Parameter : lsColumnText = {"Jones", "Smith", "Brown"} : The text to set in
the column.
Notes : Sets the text of an entire column to the specified list of strings.

Jagan Mohan Julooru 117


Method : table.SetContents (lsContents)
Parameter : lsContents = lsMyList : The values to put in the table.
Notes : Sets the contents of an entire table to the specified list of list of strings.

Method : table.SetCurrentCell (Cell)


Parameter : Cell = {row, col} : The cell to make current.
Notes : Makes the specified cell the current cell.

Method : table.SetCurrentColumn (Column)


Parameter : Column = 1 : The number or name of the column to select.
Notes : Selects the specified column.

Method : table.SetCurrentRow (iRow)


Parameter : iRow = 2 : The number of the row to select.
Notes : Selects the specified row.

Method : table.SetRangeText (TopLeftCell, BottomRightCell, lsText)


Parameter : TopLeftCell = {row, col} : The top-left cell to set.
Parameter : BottomRightCell = {row, col} : The bottom-right cell to set.
Parameter : lsText = lsMyText : The text to set in the range.
Notes : Sets the cells in the specified range to the specified list of list of strings.

Method : table.SetRowText (iRow, lsRowText)


Parameter : iRow = 1 : The row to modify.
Parameter : lsRowText = {"Jane", "Sue", "Mary"} : The text for each cell in
the row.
Notes : Sets the row to the specified list of strings.

Method : table.VerifyCellText (Cell, sExpected [, sMessage])


Parameter : Cell = {row, col} : The cell to verify.
Parameter : sExpected = "cell text" : The expected contents of the cell.

Jagan Mohan Julooru 118


Parameter : sMessage : A message describing the comparison. (Optional)
Notes : Verifies the contents of a cell.

Method : table.VerifyColumnText (Column, lsExpected [, sMessage])


Parameter : Column = 1 : The number or name of the column to verify.
Parameter : lsExpected = lsPrevious : The expected contents of the column.
Parameter : sMessage : A message describing the comparison. (Optional)
Notes : Verifies the contents of a column.

Method : table.VerifyContents (lsExpected [, sMessage])


Parameter : lsExpected = lsPrevious : The expected contents of the table.
Parameter : sMessage : A message describing the comparison. (Optional)
Notes : Verifies the contents of a table.

Method : table.VerifyRangeText (TopLeftCell, BottomRightCell,


lsExpected [, sMessage])
Parameter : TopLeftCell = {row, col} : The top-left cell of the range.
Parameter : BottomRightCell = {row, col} : The bottom-right cell of the range.
Parameter : lsExpected = lsPrevious : The expected contents of the range.
Parameter : sMessage : A message describing the comparison. (Optional)
Notes : Verifies the contents of a range.

Method : table.VerifyRowText (iRow, lsExpected [, sMessage])


Parameter : iRow = 1 : The number of the row to verify.
Parameter : lsExpected = lsPrevious : The expected contents of the row.
Parameter : sMessage : A message describing the comparison. (Optional)
Notes : Verifies the contents of a row.

Method : table.WaitCellText (Cell, sText [, iTimeout])


Parameter : Cell = {row, col} : The cell to wait for text in.
Parameter : sText = "expected" : The text to wait for.

Jagan Mohan Julooru 119


Parameter : iTimeout : How long to wait before giving up. (Optional)
Notes : Waits for the specified cell to contain the specified text.

#**********************************************************************

Class : Table

Method : table.ClickCell (cCell [, iButton, iX, iY, iCount])


Parameter : cCell = {row, col} : The cell to click on. (TABLECELL)
Parameter : iButton : The button to click. Default = 1. (INTEGER) (Optional)
Parameter : iX : The x offset. Default = 0. (INTEGER) (Optional)
Parameter : iY : The y offset. Default = 0. (INTEGER) (Optional)
Parameter : iCount : The number of clicks. Default = 1. (INTEGER)
(Optional)
Notes : Makes a cell visible, then clicks in its center.

Method : table.ClickCol (iCol [, iButton, iX, iY, iCount])


Parameter : iCol : The column to click on. (INTEGER)
Parameter : iButton : The button to click. Default = 1. (INTEGER) (Optional)
Parameter : iX : The x offset. Default = 0. (INTEGER) (Optional)
Parameter : iY : The y offset. Default = 0. (INTEGER) (Optional)
Parameter : iCount : The number of clicks. Default = 1. (INTEGER)
(Optional)
Notes : Makes a column visible, then clicks on its header.

Method : table.ClickRow (iRow [, iButton, iX, iY, iCount])


Parameter : iRow : The row to click on. (INTEGER)
Parameter : iButton : The button to click. Default = 1. (INTEGER) (Optional)
Parameter : iX : The x offset. Default = 0. (INTEGER) (Optional)
Parameter : iY : The y offset. Default = 0. (INTEGER) (Optional)

Jagan Mohan Julooru 120


Parameter : iCount : The number of clicks. Default = 1. (INTEGER)
(Optional)
Notes : Makes a row visible, then clicks in its header.

Method : table.ExtendClickCell (Cell [, iButton, iX, iY, iCount])


Parameter : cCell : The cell to click on. (TABLECELL)
Parameter : iButton : The button to click. Default = 1. (INTEGER) (Optional)
Parameter : iX : The x offset. Default = 0. (INTEGER) (Optional)
Parameter : iY : The y offset. Default = 0. (INTEGER) (Optional)
Parameter : iCount : The number of clicks. Default = 1. (INTEGER)
(Optional)
Notes : Makes a cell visible, then extend-clicks in its center.

Method : cCell = table.FindCell (sText)


Returns : cCell : The cell containing the text. (TABLECELL)
Parameter : sText = "myItem" : The text in a cell in the table. (STRING)
Notes : Returns a cell containing specified text.

Method : Rect = table.GetCellRect (cCell)


Returns : Rect : The location of the cell. (RECT)
Parameter : cCell = "item" : The cell to locate.
Notes : Returns the x,y location and size of a cell in a table.

Method : aValue = table.GetCellValue (cCell [, Type])


Parameter : cCell : The cell to get the value of. (TABLECELL)
Parameter : Type : TVT_TEXT if text; TVT_TYPED if native data type.
(TABLEVALUETYPE)
Notes : Returns the text in a cell.

Method : iCount = table.GetColumnCount()


Returns : iCount : The column count. (INTEGER)

Jagan Mohan Julooru 121


Notes : Return the number of columns in a table.

Method : sName = table.GetColumnName (iCol)


Returns : sName : The name of the column. (STRING)
Parameter : iCol : The number of the column. (INTEGER)
Notes : Returns the name of the column in a table.

Method : lsContents = table.GetContents ([bRawMode])


Returns : lsContents : The contents of each cell (LIST OF STRING).
Parameter : bRawMode : Prevents spaces from being stripped. (BOOLEAN)
Notes : Returns the contents of each cell in a table.

Method : table.GetFileRangeValue (sPath, Range)


Parameter : sPath : The pathname of the file. (STRING)
Parameter : Range : The range of the table to save in the file.
(TABLERANGE)
Notes : Saves the values of cells in a specified range to a tab-delimited file.

Method : cCell = table.GetFocusCell ()


Returns : cCell : The cell with focus. (TABLECELL)
Notes : Returns the cell in a table that has focus.

Method : iCol = table.GetFocusColumn ()


Returns : iCol : The column with focus. (INTEGER)
Notes : Returns the column in a table that has focus.

Method : iRow = table.GetFocusRow ()


Returns : iRow : The row with focus. (INTEGER)
Notes : Returns the row in a table that has focus.

Method : lcCells = table.GetMultiSelCell ()

Jagan Mohan Julooru 122


Returns : lcCells : The returned list of cells. (LIST OF TABLECELL)
Notes : Returns the selected cells of a table.

Method : lsText = table.GetMultiSelText ()


Returns : lsText : The returned list of cell values. (LIST OF STRING)
Notes : Returns the text of the selected cells in a table.

Method : llaValues = table.GetRangeValue(Range [,Type])


Returns : llaValues : A list of the value in the range. (LIST OF LIST OF
ANYTYPE)
Parameter : Range : The range of values to the get values of.
Parameter : Type : TVT_TEXT if text; TVT_TYPED if native data type.
(TABLEVALUETYPE)
Notes : Returns the list of values for each row within a range.

Method : iRowCount = table.GetRowCount ()


Returns : iRowCount : The number of rows in the table. (INTEGER)
Notes : Returns the number of rows in a table.

Method : sText = table.GetRowName (iRow)


Returns : sText : The returned string. (STRING)
Parameter : iRow : The row of the table. (INTEGER)
Notes : Returns the text of the header of a specified row.

Method : iIndex = table.GetSelCell ( )


Returns : iIndex : The returned cell. (TABLECELL)
Notes : Returns the selected cell in a single-selection table.

Method : liCols = table.GetSelCols ()


Returns : liCols : The returned list of column numbers. (LIST OF
INTEGER)

Jagan Mohan Julooru 123


Notes : Returns the selected columns in a table.

Method : Range = table.GetSelRange ([bAsText])


Returns : Range : The range of cells selected in the table.
(TABLERANGE)
Parameter : bAsText : TRUE to return string form, FALSE to return integer
form.
Notes : Returns the range of selected cells in a table.

Method : liRows = table.GetSelRows ()


Returns : liRows : The returned list of row numbers. (LIST OF INTEGER)
Notes : Returns the selected rows in a table.

Method : sText = table.GetSelText ()


Returns : sText : The returned string. (STRING)
Notes : Returns the text of the selected cell in a single-selection table.

Method : iIndex = table.GetTopVisibleRow ()


Returns : iIndex : The index for the top-most displayed row. (INTEGER)
Notes : Returns the 1-based index value for the top-most displayed row for a table.

Method : iCount = table.GetVisibleRowCount ()


Returns : iCount : The number of visible rows. (INTEGER)
Notes : Returns the number of rows currently displayed on the screen for a table.

Method : bSupports = table.IsExtendSel ()


Returns : bSupports : TRUE if can extend selections, else FALSE.
Notes : Tests whether a table supports extended selections.

Method : bSupports = table.IsMultiSel ()


Returns : bSupports : TRUE if can select multiple cells, else FALSE.

Jagan Mohan Julooru 124


Notes : Tests whether a table supports selection of multiple cells.

Method : table.MultiClickCell (Cell [, iButton, iX, iY, iCount])


Parameter : cCell : The cell to click on. (TABLECELL)
Parameter : iButton : The button to click. Default = 1. (INTEGER) (Optional)
Parameter : iX : The x offset. Default = 0. (INTEGER) (Optional)
Parameter : iY : The y offset. Default = 0. (INTEGER) (Optional)
Parameter : iCount : The number of clicks. Default = 1. (INTEGER)
(Optional)
Notes : Makes a cell visible, then multi-clicks in its center.

Method : table.SelectCol(iCol, bClearSelection, bUseMouse)


Parameter : iCol : The column to select. (INTEGER)
Parameter : bClearSelection : If TRUE, any existing selection will be cleared.
(BOOL)
Parameter : bUseMouse : If TRUE, the mouse is used to select, otherwise the
keyboard is used. (BOOL)
Notes : Selects the specified column in a table.

Method : table.SelectRow(iRow, bClearSelection, bUseMouse)


Parameter : iRow : The row to select. (INTEGER)
Parameter : bClearSelection : If TRUE, any existing selection will be cleared.
(BOOL)
Parameter : bUseMouse : If TRUE, the mouse is used to select, otherwise the
keyboard is used. (BOOL)
Notes : Selects the specified row in a table.

Method : table.SetCellValue(cCell, aValue)


Parameter : cCell : The cell. (TABLECELL)
Parameter : aValue : The value to set the cell to. (ANYTYPE)
Notes : Enters a value into a cell (the cell must be able to receive input).

Jagan Mohan Julooru 125


Method : table.SetFocusCell(cCell)
Parameter : cCell : The cell to set focus to. (TABLECELL)
Notes : Sets the focus to a cell in a table.

Method : table.SetFocusColumn(iCol)
Parameter : iCol : The column to set focus to. (INTEGER)
Notes : Sets the focus to a column in a table.

Method : table.SetFocusRow(iRow)
Parameter : iRow : The row to set focus to. (INTEGER)
Notes : Sets the focus to a row in a table.

Method : table.SetRangeValue (Range, llaRangeValues)


Parameter : Range : The range of cells to set. (TABLERANGE)
Parameter : llaRangeValues : The list of values for each row in the range.
(LIST OF LIST OF ANYTYPE)
Notes : Sets the cell values in a specified range.

Method : table.SetSelRange(Range, bClearSelection, bUseMouse)


Parameter : Range : The range of cells to select. (TABLERANGE)
Parameter : bClearSelection : If TRUE, any existing selection will be cleared.
(BOOL)
Parameter : bUseMouse : If TRUE, the mouse is used to select, otherwise the
keyboard is used. (BOOL)
Notes : Selects a range of cells in a table.

Method : iDisplayOrder = table.ShowRow (iRow [, bAtTop])


Returns : iDisplayOrder : The 1-based visible order for iRow after it has
been displayed.
Parameter : iRow : The 1-based index value for the row to display.

Jagan Mohan Julooru 126


Parameter : bAtTop : If TRUE, ShowRow tries to make iRow the first visible
row. (Optional; default is FALSE).
Notes : Ensures that a specified row is displayed on the screen.

Method : table.VerifyCellValue (cCell, aExpected)


Parameter : cCell : The cell to verify.
Parameter : aExpected : The expected value of the cell.
Notes : Verifies the value of cell in a table.

Method : table.VerifyContents (lsExpected)


Parameter : lsExpected : The values you expect the table to have.
Notes : Verifies the contents of a table.

Method : VerifyFileRangeValue(sPath, Range)


Parameter : sPath : The pathname of the file to verify. (STRING)
Parameter : Range : The range of the table to verify. (TABLERANGE)
Notes : Verifies that the values in a specified range match the values in a file.

Method : VerifyRangeValue(Range, llaValues [,Type])


Parameter : Range : The range of the table to verify. (TABLERANGE)
Parameter : llaValues : The list of values. (LIST OF LIST OF ANYTYPE)
Parameter : Type : TVT_TEXT if text; TVT_TYPED if native data type.
(TABLEVALUETYPE)
Notes : Verifies that the values in the specified range match the specified values.

Method : table.VerifyValue (aExpected)


Parameter : aExpected : The text or cell of the expected selection. (ANYTYPE)
Notes : Verifies the selected cells in the table

property : lsContents
Notes : The contents of the table (read only).

Jagan Mohan Julooru 127


property : bIsExtend
Notes : Whether the table supports extended selections (read only).

property : bIsMulti
Notes : Whether the table supports multiple selections (read only).

property : iRowCount
Notes : The number of rows in the table (read only).

property : iColCount
Notes : The number of columns in the table (read only).

property : iValue
Notes : The selected cell in the single-selection table.

property : liValue
Notes : The cells of all selected cells in the table (read only).

property : lsValue
Notes : The text of all selected cells in the table (read only).

property : sValue
Notes : The text of the selected cell in the single-selection table.

#**********************************************************************

Class : TaskbarWin

Method : Loc = taskbar.GetLocation ()


Returns : Loc : Location of the taskbar. (TBLOC)

Jagan Mohan Julooru 128


Notes : Returns the location of the Windows 95/NT taskbar.

Method : iSize = taskbar.GetSize ()


Returns : iSize : Size of the taskbar.
Notes : Returns the height or width in pixels of the Windows 95/NT taskbar.

Method : taskbar.SetActive ()
Notes : Makes the Windows 95/NT taskbar active.

Method : taskbar.SetLocation (Loc)


Parameter : Loc : Location to set the taskbar to. (TBLOC)
Notes : Sets the location of the Windows 95/NT taskbar.

Method : taskbar.SetSize (iSize)


Parameter : iSize : Size of the taskbar.
Notes : Sets the height or width in pixels of the Windows 95/NT taskbar.
#**********************************************************************

Jagan Mohan Julooru 129

S-ar putea să vă placă și