|
本帖最后由 dflyj2 于 2017-5-18 10:17 编辑
L020001H> lt all
L020001H> get sector power
=================================================================================================================
MO Attribute Value
=================================================================================================================
SectorCarrier=1 configuredMaxTxPower 80000
SectorCarrier=1 csiRsPowerRatio 0
SectorCarrier=1 maximumTransmissionPower 490
SectorCarrier=1 txPowerPersistentLock false
SectorCarrier=2 configuredMaxTxPower 80000
SectorCarrier=2 csiRsPowerRatio 0
SectorCarrier=2 maximumTransmissionPower 490
SectorCarrier=2 txPowerPersistentLock false
SectorCarrier=3 configuredMaxTxPower 80000
SectorCarrier=3 csiRsPowerRatio 0
SectorCarrier=3 maximumTransmissionPower 490
SectorCarrier=3 txPowerPersistentLock false
SectorEquipmentFunction=1 availableHwOutputPower 80000
SectorEquipmentFunction=2 availableHwOutputPower 80000
SectorEquipmentFunction=3 availableHwOutputPower 80000
=================================================================================================================
Total: 6 MOs
L020001H> q
Bye...
以上为源TXT文本内容,
提取后为:
SectorCarrier=1 configuredMaxTxPower 80000
SectorCarrier=1 csiRsPowerRatio 0
SectorCarrier=1 maximumTransmissionPower 490
SectorCarrier=1 txPowerPersistentLock false
SectorCarrier=2 configuredMaxTxPower 80000
SectorCarrier=2 csiRsPowerRatio 0
SectorCarrier=2 maximumTransmissionPower 490
SectorCarrier=2 txPowerPersistentLock false
SectorCarrier=3 configuredMaxTxPower 80000
SectorCarrier=3 csiRsPowerRatio 0
SectorCarrier=3 maximumTransmissionPower 490
SectorCarrier=3 txPowerPersistentLock false
SectorEquipmentFunction=1 availableHwOutputPower 80000
SectorEquipmentFunction=2 availableHwOutputPower 80000
SectorEquipmentFunction=3 availableHwOutputPower 80000
请大神帮忙看看,一下为我写的代码,但是提取不出来~
Sub cov()
Dim f
Dim arrstrinput As String
Dim arrinput, arrcell, arrline
Dim blsts As Boolean
f = Application.GetOpenFilename("kget,*.log", 1, , , False)
blsts = False
Open f For Input As #1
Do Until EOF(1)
Line Input #1, arrstrinput
If InStr(arrstrinput, "get") Then
arrinput = Split(arrstrinput, ">")
arrcell = arrinput(0)
ElseIf InStr(arrstrinput, "=====") > 0 Then
blsts = False
GoTo nextline
ElseIf InStr(arrstrinput, "MO Attribute Value") > 0 Then
blsts = True
GoTo nextline
ElseIf blsts = True Then
arrline = Trim(arrstrinput)
End If
nextline:
Loop
Open "D:\OUT.log" For Append As #2
Print #2, arrline
Close #2
'MsgBox arrline
Close #1
End Sub
|
|