Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
proc main
when USEREXIT call term
;LOGOUT OF ANY LD's
transmit "****^M"
pause 1
call EnableIt
call term
endproc
proc EnableIt
integer nItem = 0
integer Len
integer Model = 0
string DirNums, CurDirN, EnterStr
string FName ; Name of capture file to open.
string LineInfo ; Line from file.
string FNamebb = "C:\Program Files\Symantec\Procomm Plus\Capture\TN_Info.csv"
string TmpStrAA, TmpStrBB, TmpStrCC, TmpStrDD, Info_Str
Fname = "screen.txt" ; Name of capture file to open.
EnterStr = "^M"
when USEREXIT call term ;if user selects exit, call term then exit
;Run LD20
transmit "LD 20^M"
waitfor "REQ:"
sdlginput "Automatically Check and Re-Enable Selected DN's" "Enter 4 digit DN's seperated by a comma." DirNums
;open TN_Info file for data
fopen 3 FNamebb CREATE TEXT
fputs 3 "CUST,DN,TN,TYPE"
while 1 ; Loop forever, or until EXITWHILE.
strextract CurDirN DirNums "," nItem
if not nullstr CurDirN ; See if we're at the end of list.
;This part of the script is where the DN's are resolved as TN's.
transmit "prt^M"
waitfor "TYPE:"
transmit "dnb^M"
waitfor "CUST"
transmit "0^M"
waitfor "DN"
strlen CurDirN Len ; Check length of text string.
if Len == 4 ; if Len is correct perform action
strcat CurDirN EnterStr
mspause 100
transmit CurDirN
waitfor "DATE"
transmit EnterStr
waitfor "PAGE"
transmit EnterStr
waitfor "DES"
transmit EnterStr
waitfor "NACT"
;capture screen display to file
set capture file FName ; Set name of capture file.
set capture overwrite ON
capture on ; Open up the capture file.
transmit EnterStr
waitfor "REQ:"
capture off ; Close the capture file.
;playback from capture file
FName = "C:\Program Files\Symantec\Procomm Plus\Capture\Screen.txt"
if isfile FName ; Make sure file exists.
if fopen 0 FName READ ; Open file for read.
while not feof 0 ; Loop to end of file.
fgets 0 LineInfo ; Get line from file.
if rstrcmp LineInfo "CUST" 4 ;1st 4 chars are 'CUST'
substr TmpStrAA LineInfo 5 2 ; get CUST Info
endif
if rstrcmp LineInfo "DN " 4 ;1st 4 chars are 'DN '
substr TmpStrBB LineInfo 5 4 ; get DN Info
endif
if rstrcmp LineInfo "TN " 4 ;1st 4 chars are 'TN '
;so check for MARP
if strfind LineInfo "MARP"
;it is the MARP
substr TmpStrCC LineInfo 5 11 ; get TN Info
Model = 1 ;turn on search for Model
endif
endif
if Model == 1
;search for Model No
if rstrcmp LineInfo " (" 5 ;1st 5 chars are 'xxxxx('
substr TmpStrDD LineInfo 6 4 ; get Model Info
;reset model
Model = 0
endif
endif
if rstrcmp LineInfo "NACT" 4 ;1st 4 chars are 'NACT'
;clean up strings
strreplace TmpStrAA "`n" "" ;strip new line string
strreplace TmpStrAA "`r" "" ;strip return string
strreplace TmpStrBB "`n" "" ;strip new line string
strreplace TmpStrBB "`r" "" ;strip return string
strreplace TmpStrCC "`n" "" ;strip new line string
strreplace TmpStrCC "`r" "" ;strip return string
strreplace TmpStrDD "`n" "" ;strip new line string
strreplace TmpStrDD "`r" "" ;strip return string
;so write string info to file
strcat Info_Str TmpStrAA
strcat Info_Str ","
strcat Info_Str TmpStrBB
strcat Info_Str ","
strcat Info_Str TmpStrCC
strcat Info_Str ","
strcat Info_Str TmpStrDD
fputs 3 Info_Str
Info_Str = "" ;reset Info_Str
endif
endwhile
fclose 0 ; Close the file.
endif
else
errormsg "File doesn't exist."
endif
else
transmit "****^M"
waitfor ">"
transmit "LD 20^M"
waitfor "REQ:"
endif
nItem++ ; Increment.
else
exitwhile ; If blank file name, exit loop.
endif
endwhile
fclose 3
run FnameBB
endproc
proc term
;log out of LD's
transmit "****^M"
endproc