为什么我的value值没有传进去呢
Sub mainDim Result As Integer
StartApplication "calc"
Window SetContext, "Caption=计算器", ""
InputKeys "1{+}1{ENTER}"
Dim value as string
Result= SQAGetProperty("Type=Label;ObjectIndex=1", "Text", value)
SQAConsoleWrite "计算器的值是:"+cstr(value)
Window SetContext, "Caption=计算器", ""
Window CloseWin, "", ""
End Sub
这段代码编译运行正确,就是显示为“计算器的值是:”,而value的值没有传进去,这是为什么呢?:,(:,(:o:o:o Sub main
Dim Result As Integer
StartApplication "calc"
Window SetContext, "Caption=计算器", ""
InputKeys "1{+}1{ENTER}"
Dim value as string
Result= SQAGetProperty("Type=Label;ObjectIndex=1", "Text", value)
if (Result = sqaSuccess and value <> "" ) then
SQAConsoleWrite "计算器的值是:"+cstr(value)
else
SQAConsoleWrite "失败"
end if
Window SetContext, "Caption=计算器", ""
Window CloseWin, "", ""
End Sub
[ Last edited by pcl2004_27 on 2004-9-9 at 12:45 ]
页:
[1]