AIT_VerifyState
- Organization of this page
Description
Checks whether the specific control has been checked in the active window.
Format
integer AIT_VerifyState ( string strCaption, // Control's caption integer nCtrlType // Control type ); integer AIT_VerifyState ( integer nCtrlID, // Control ID integer nCtrlType // Control type );
Parameters
strCaption (input)
Specify the caption of a control.
nCtrlID (input)
Specify a control ID.
nCtrlType (input)
Specify a control type, which must be one of the following values.
Value |
Description |
---|---|
CHECKBOX_CTRL |
The control type is a check box. |
OPTIONBUTTON_CTRL |
The control type is an option button. |
Return values
The return value is 1 if the control is checked, 0 if not, 2 if unknown, and -1 if the function has not been processed successfully. The unknown status is applied only to CHECKBOX_CTRL. If -1 has been returned, you can use AIT_GetLastError to acquire an extended error code. The following gives the error codes that AIT_GetLastError might return:
Extended error number |
Error code |
---|---|
8 |
ERROR_NOT_ENOUGH_MEMORY |
14 |
ERROR_OUTOFMEMORY |
87 |
ERROR_INVALID_PARAMETER |
112 |
ERROR_DISK_FULL |
1400 |
ERROR_INVALID_WINDOW_HANDLE |
1460 |
ERROR_TIMEOUT |
Note
You can identify the control by using a complete caption or an associated label name or specifying the first part of such a caption or label name. When specifying the first part, prefix a swung dash (~) to the character string that you specify.