|
'$Include "sqautil.sbh"
Sub Main
Dim Result As Integer
'Initially Recorded: 1/17/2006 12:29:15 PM
'Script Name: testScriptForDP
dim x as integer
dim num1 as string
dim num2 as string
dim sum as string
dim dp as long
'call the calculator
startApplication "C:\WINNT\system32\calc.exe"
'open data pool
dp= SQADatapoolOpen("testData")
for x=1 to 4
call SQADataPoolFetch(dp)
'read data from data pool
call SQADatapoolValue(dp,1,num1)
call SQADatapoolValue(dp,2,num2)
call SQADatapoolValue(dp,3,sum)
'assign data which we read from data pool to variables respectively
Window SetContext,"Caption=Calculator",""
InputKeys num1 & "{+}" & num2 & "{ENTER}"
Result = LabelVP (CompareNumeric, "Text=" & sum & ".", "VP=Alphanumeric;Value=" & sum & ".")
if Result=1 then 'if success ,give the user success information
MsgBox "successful"
end if
next
Call SQADatapoolClose(dp)
Window CloseWin, "", ""
End Sub |
|