Description: Extracts data from datapool and writes the data to the open tablet one by one.
Preparations:
- Use testmanager to create a datapool named test so that it contains three fields.
- A project has been established.
Procedure:
- Record the manual script.
- Modify the manual script.
The content of test may be:
Karen 160585250 millersport hwy
Koganti 160585250 kings hwy
Clarence 160585250 5th St
Pam 160585250 Broadway
Izzy 160585250 Air Way
Gene 160585250 Blackstone Ave
Linsey 160585250 Wilshire Blvd
Napoleon 160585250 Larkspur landing CIR suite
Lester 160585250 Peck Rd
Norman 160585250 Crescent Ave
The modified script datapooldemo is:
'$ Include "sqautil. SBH"
Sub main
Dim result as integer
Dim sname as string
Dim sage as string
Dim saddress as string
Dim I as integer
Dim DP as long
Shell "C:/program files/Windows NT/accessories/wordpad.exe", 3
Dp = sqadatapoolopen ("test ")
Window setcontext, "caption = Document-WordPad ",""
Editbox click, "objectindex = 1", "coords = 54,23"
For I = 1 to 10
Call sqadatapoolfetch (DP)
Call sqadatapoolvalue (DP, 1, sname) 'dp-1 => sname
Call sqadatapoolvalue (DP, 2, SAGE) 'dp-2 => sage
Call sqadatapoolvalue (DP, 3, saddress) 'dp-3 => saddress
Inputkeys sname + "" + sage + "" + saddress + "{enter }"
Next I
Call sqadatapoolclose (DP)
End sub