Here is the script I am using now Thanks to Knob!! It works great.
proc main
when $CARRIER call check_carrier
while 1
yield
endwhile
endproc
proc check_carrier
set capture overwrite on
capture on
if $CARRIER == 0
capture off
endif
StartProcess ( )
endproc
Proc StartProcess
string sLine
fopen 0 "C:\Program files\Symantec\Procomm Plus\Capture\wbfc.txt.cap" Read Text ; Source File
set capture overwrite on
fopen 1 "C:\Program files\Symantec\Procomm Plus\Capture\wbfc.txt" Create Text ; Destination File
while not feof 0
fgets 0 sLine
if strfind sLine "Final Type:"
fputs 1 sLine
endif
if strfind sLine "Fire Box:"
fputs 1 sLine
endif
if strfind sLine "Loc:"
fputs 1 sLine
endif
if strfind sLine "AKA:"
fputs 1 sLine
endif
endwhile
fclose 0
fclose 1
endproc
Now I need to pull the sline info off as I am doing now but!! Now I need it to save to different files depending on the key words found. Here is a copy of the text info it is the same format every time.
+++
Inc History #WBRF02000598 Xref: #50PJ02000875
TEST ONLY
Received 09/02/02 16:40:24 BY CT01 584
Entered 09/02/02 16:40:54 BY CT01 584
Dispatched 09/02/02 16:41:11 BY XD19 151
Enroute 09/02/02 16:43:00
Onscene 09/02/02 16:52:47
Initial Type:ASEIZUR Final Type: ASEIZUR (SEIZURES - ALS *)
- BLS
*
Initial Priority: 1 Final Priority: 1
Initial Alarm Level: 1 Final Alarm Level: 1 Disposition: Source: 9 Primary Unit: AMB462 Rsp: 0045
Police BOX: 5008 Fire BOX: 3909 EMS BOX: 3909
Group: 39FD Section: 39 Map: X: 7569102 Y: 3997912
Loc: 1111 MARYLAND CI ,50 btwn MARYLAND CI & MARYLAND CI (V)
AKA: Municipality: WBRAD Dev:
Name: TEST ONLY !! Addr: SAA PH: 610-269-6882
/1640 (584 ) ENTRY 21MONTHS/F - SEIZURE
/1641 (151 ) DISP AMB461 #AMB461 AMB461 MDT
/1641 ASST MED932 #MED932 MED932 MDT
/1641 ASST 39QRS
/1641 (584 ) SUPP NAM: MILLER, STEFFANIE,
ADR: SAA,
TXT: MED HX - NO / HAS TAKEN TYLONOL FOR FEVER
/1643 (MED932) *ENROUT MED932
/1644 (436 ) $PREMPT AMB461
/1644 $ASSTER AMB462 #AMB462 AMB462 MDT
/1644 EXCH AMB461 AMB462
/1648 (151 ) ENROUT 39QRS [LT-A]
/1652 (AMB462) *ONSCNE AMB462
/1705 (MED932) *AOR MED932
/1709 (AMB462) *TRANS AMB462 [CCH]
/1710 *MISC AMB462 ,051
/1711 (151 ) AIQ 39QRS
+++
Ok in the line that looks like!
Initial Type:ASEIZUR Final Type: ASEIZUR (SEIZURES - ALS *)
At the end here ( SEIZURES - ALS *)
The -ALS is the key word the other key would be -BLS or just
a *. So if the script sees one of these keys I need a file with the same sline info as I am getting now but only placed in ALS.txt or BLS.txt or fire.txt.
Ok I hope this helps?
Thanks