sub main
Dim Result as integer
dim value as string
Window SetContext, "Caption=仓库管理系统 - [进货一览表]", ""
Window SetContext, "Caption=进货一览表;ChildWindow", ""
InputKeys "{F4}"
Window SetContext, "Caption=查询框", ""
InputKeys "{ENTER}"
Result=SQAGetProperty("./","Recognition",value)
'获得当前窗口的类型和标题
'第一个,需要取属性的对象;
'第二个,需要取的属性;
'第三个,用来保存返回的属性值。
'str(value) '返回当前窗口的类型和标题为字符串
If str(value)="Type=Window;Caption=基本查询框" Then
msgbox "sqaPass"
Else
msgbox "sqaFail"
End If
<