|
小弟甘接触Robot,在GUI方面有两个问题望大虾指点迷津...谢谢...
1.GUI脚本是否有可设置循环次数的地方??
2.若无,我在下面的脚本中写循环语句不知是否妥当???计算器可循环10次,数据池头一次可以用,接下来的都不行.脚本如下:
'$Include "SQAUTIL.SBH"
Sub Main
Dim Result As Integer
dim x as integer
dim num1 as string
dim num2 as string
dim sum as string
Dim dp as Long
'Initially Recorded: 2007-12-28 14:59:31
'Script Name: jsq
For Result = 0 to 9
StartApplication "C:\WINDOWS\system32\calc.exe"
dp=SQADatapoolOpen("jsq")
for x=1 to 9
Call SQADatapoolFetch(dp)
Call SQADatapoolValue(dp,1,num1)
Call SQADatapoolValue(dp,2,num2)
Call SQADatapoolValue(dp,3,sum)
'Window SetContext, "Caption=计算器", ""
InputKeys num1 &"{+}"& num2 &"{ENTER}"
next
Call SQADatapoolClose(dp)
Window CloseWin, "", ""
Next Result
End Sub |
|