Below is a script I used to collect vector information. It uses the snapshot to capture Definity screens.
String NUMFILE = "tempnums.txt", SUBFILENAME = "VNUMBERS.txt"
sTRING vnumber
PROC MAIN
integer LEN, EVENTID ; Integer for length of string.
dialogbox 0 8 20 140 237 2 "List of Vectors and VDNs"
feditbox 1 6 3 58 187 NUMFILE
pushbutton 2 10 204 40 13 "OK" OK default
pushbutton 3 82 204 40 13 "Cancel" CANCEL
enddialog
While 1
dlgEvent 0 EventID ; Get dialog EventID.
switch EventID ; Evaluate the EventID.
case 0 ; No EventID occurred.
endcase
Case 2
ExitWhile
Endcase
Case 3
Exit
Endcase
default ; Dialog EventID occurred.
exitwhile ; Exit the while loop.
endcase
endswitch
Endwhile
dlgdestroy 0 OK ; Destroy dialog box.
Fopen 0 Numfile read text
While not feof 0
Fgets 0 VNUMBER
Strlen VNUMBER LEN
If LEN == 5
VDNs()
Elseif LEN == 3
Vectors()
Else
Usermsg "Invalid Input Length. Must be 3 or five digits"
Endif
EndWhile
endproc
Proc Vectors
transmit "DISPL VECTOR "
transmit VNUMBER
Transmit "^M"
waitfor "11"
Pause 1
Snapshot FILE SUBFILENAME append
Clear ;Clears the terminal display and the status line.
SendVKey 0x76 ;F7 Key (Page Down)
waitfor "22"
Pause 1
Snapshot FILE SUBFILENAME append
Clear ;Clears the terminal display and the status line.
SendVKey 0x76 ;F7 Key (Page Down)
waitfor "32"
Pause 1
Snapshot FILE SUBFILENAME append
SendVKey 0x70 ;F1 Key (Cancel)
Endproc
Proc VDNs
transmit "DISPL VDN "
transmit VNUMBER
Transmit "^M"
waitfor "3rd Skill"
Pause 1
Snapshot FILE SUBFILENAME append
Clear ;Clears the terminal display and the status line.
SendVKey 0x76 ;F7 Key (Page Down)
waitfor "Agent Answer"
Pause 1
Snapshot FILE SUBFILENAME append
SendVKey 0x70 ;F1 Key (Cancel)
Endproc
Robert Harris